ShadowWal
Aug 8th, 2000, 02:30 AM
greetings, i have been using inet to Try to check the status of webpages. it works up to when a timeout happens then the rest of the links are auto set to DNS. i have tryed to use winsock to download the page, but my program doesnt give it enofe time to download the data before going to the next item on the list. i have tryed to use sleep, a do while, and nothing has helped..thanks for any help
code:
For i = 1 To lvAcc.ListItems.Count
rtbBody.Text = "": rtbHeader.Text = ""
ListBody.Clear: ListHeader.Clear
Set lvAcc.SelectedItem = lvAcc.ListItems(i)
Dim a
a = Split(lvAcc.ListItems(i).SubItems(1), "/", 4)
MsgBox a(2)
Winsock1.RemoteHost = "" & a(2) & ""
Winsock1.RemotePort = 80
Winsock1.Connect
...' more here to add the Return Code
next i
Winsock.connect
Dim strCommand As String
Dim strWebPage As String
strWebPage = lvAcc.ListItems(i).SubItems(1)
MsgBox strWebPage
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + "Accept: text/html" + vbCrLf
strCommand = strCommand + vbCrLf
Winsock1.SendData strCommand
winsock.data_arrival
Dim webData As String
Winsock1.GetData webData, vbString
RichTextBox1.Text = RichTextBox1.Text + webData
code:
For i = 1 To lvAcc.ListItems.Count
rtbBody.Text = "": rtbHeader.Text = ""
ListBody.Clear: ListHeader.Clear
Set lvAcc.SelectedItem = lvAcc.ListItems(i)
Dim a
a = Split(lvAcc.ListItems(i).SubItems(1), "/", 4)
MsgBox a(2)
Winsock1.RemoteHost = "" & a(2) & ""
Winsock1.RemotePort = 80
Winsock1.Connect
...' more here to add the Return Code
next i
Winsock.connect
Dim strCommand As String
Dim strWebPage As String
strWebPage = lvAcc.ListItems(i).SubItems(1)
MsgBox strWebPage
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + "Accept: text/html" + vbCrLf
strCommand = strCommand + vbCrLf
Winsock1.SendData strCommand
winsock.data_arrival
Dim webData As String
Winsock1.GetData webData, vbString
RichTextBox1.Text = RichTextBox1.Text + webData