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:
  1. Winsock1.GetData Data2, vbString
  2.  
  3. 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:
  1. If instr(data, "</html>") > 0 then winsock1.close




all of it...

VB Code:
  1. Private Sub Command1_Click()
  2. Winsock1.Close
  3. Winsock1.Connect "profiles.yahoo.com", 80
  4. End Sub
  5.  
  6. Private Sub winsock1_connect()
  7. Winsock1.SendData "GET /auser HTTP/1.0" & vbCrLf & vbCrLf
  8. End Sub
  9.  
  10. Private Sub winsock1_dataarrival(ByVal bytesTotal As Long)
  11. Dim pdat As String
  12.  
  13. Winsock1.GetData pdat, vbString
  14. RichTextBox1 = RichTextBox1.Text & pdat
  15. End Sub