- Код: Выделить всё
Dim Data As String
Private Sub Command1_Click()
Winsock1.Protocol = sckTCPProtocol
Winsock1.LocalPort = 0
Winsock1.Connect "www.yandex.ru/", 80
While Not Winsock1.State = 7
DoEvents '
Wend '
Text1.Text = "Ïîäêëþ÷åíèå ïðîøëî óñïåøíî "
Parametrs = "login=1111111111&passwd=11111111"
Winsock1.SendData "POST http://www.yandex.ru/passport?mode=auth&retpath=http: //mail.yandex.ru HTTP/1.1" & vbCrLf
Winsock1.SendData "Content-Type: application/x-www-form-urlencoded" & vbCrLf
Winsock1.SendData "Host: passport.yandex.ru" & vbCrLf
Winsock1.SendData "Content-Length: 29" & vbCrLf & vbCrLf
Winsock1.SendData Parametrs & vbCrLf
End Sub
Private Sub Command2_Click()
Text1.Text = Data
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim Data As String
Winsock1.GetData Data
End Sub