IF this makes sense

VB Code:
  1. Option Explicit
  2.  
  3. Private m_ftpSite As String
  4. Private m_userName As String
  5. Private m_password As String
  6. Private m_ip As String
  7.  
  8. Public Sub CheckIfConnected()
  9. Call GetConstance
  10. If InternetGetConnectedState(0, 0) Then
  11.  
  12.     If CheckIp() <> GetIp() Then
  13.    
  14.    
  15.          Call FTPindexhtml
  16.          DoEvents
  17.          DoEvents
  18.          DoEvents
  19.            Call FTPindexhtml
  20.          DoEvents
  21.          DoEvents
  22.          DoEvents
  23.          
  24.          
  25.          Call SetIp
  26.          
  27.     End If
  28.    
  29. Else
  30.     '****ty off line .. never really good to be off line
  31. End If
  32. End Sub
  33.  
  34. Public Sub FTPindexhtml()
  35. ServiceMain.Inet1.URL = m_ftpSite
  36. ServiceMain.Inet1.UserName = m_userName
  37. ServiceMain.Inet1.Password = m_password
  38. ServiceMain.Inet1.Protocol = icFTP
  39. 'Inet1.Execute , "put " & App.Path & "\index.html /index.html"
  40. ServiceMain.Inet1.Execute , "put " & "c:\index.html /index.html"
  41.     Do While ServiceMain.Inet1.StillExecuting
  42.     DoEvents
  43.     Loop
  44.    
  45. End Sub
  46.  
  47. Public Sub GetConstance()
  48. 'Open App.Path & "\ftp.txt" For Input As #1   ' Open file for input.
  49. Open "c:" & "\ftp.txt" For Input As #1   ' Open file for input.
  50.     Do While Not EOF(1)
  51.            Input #1, m_ftpSite, m_userName, m_password, m_ip
  52.     Loop
  53. Close #1
  54. End Sub

REMEMBER...I JUST CUT THAT OUT OF A PROGRAM I AM WORKING ON
Seahag