When I try to get data I get them in parts, i receive one part, another, and so on, so to get the source of the page i have to do like...
VB Code:
Winsock1.GetData Data2, vbString Data = Data & Data2
Only... how do i figure out when to put Winsock1.Close?
When I add it after "Data = Data & Data2," I just get the first part/section of the html..
I can't do (below) because not all sites have it, and are maybe just a list of something uploaded onto a webserver..
VB Code:
If instr(data, "</html>") > 0 then winsock1.close
all of it...
VB Code:
Private Sub Command1_Click() Winsock1.Close Winsock1.Connect "profiles.yahoo.com", 80 End Sub Private Sub winsock1_connect() Winsock1.SendData "GET /auser HTTP/1.0" & vbCrLf & vbCrLf End Sub Private Sub winsock1_dataarrival(ByVal bytesTotal As Long) Dim pdat As String Winsock1.GetData pdat, vbString RichTextBox1 = RichTextBox1.Text & pdat End Sub
![]()




Reply With Quote