hola he estado intentando hacer una peticion http utilizando el control winsock de visual y que me imprima la respuesta en un textbox ( o sea el kodigo html de la pagina) pero se me es inutil... aki les dejo lo que intente:
Citar
Dim datos As String
Private Sub Command1_Click()
Winsock1.Close
Winsock1.Connect "www.google.com", 80
End Sub
Private Sub WS_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Strtrequest = "GET /" + Text2.Text & " HTTP/1.1" & vbCrLf
Strtrequest = strrequest & "Host: " & Text1.Text & vbCrLf
Strtrequest = strrequest & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/2.0.1" & vbCrLf
Strtrequest = strrequest & "Accept-Language: en-us,en;q=0.5" & vbCrLf
Strtrequest = strrequest & "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf
Strtrequest = strrequest & "Keep-Alive: 300" & vbCrLf
Strtrequest = strrequest & "" & vbCrLf
Strtrequest = strrequest & "Connection: keep-alive" & vbCrLf
Strtrequest = strrequest & "Referer: " & Text1.Text & vbCrLf
Winsock1.SendData Strtrequest
Winsock1.GetData datos
Text1.Text = Text1.Text + datos
End sub