vb登录百度帐号不成功了!高手帮忙
本帖最后由 atfeel 于 2011-08-27 16:55:30 编辑 测试时请先添加inet控件,commmend控件各一个
Private Sub Command1_Click()
Dim PostDate As String
PostDate = "username=百度帐号&password=密码"
Inet1.Execute "https://passport.baidu.com/?login", "POST", PostDate, "Referer: https://passport.baidu.com/?login&tpl=mn" & vbCrLf & "Content-Type: application/x-www-form-urlencoded"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
If State = 12 Then
Dim strData As String
Dim bDone As Boolean: bDone = False
vtData = Inet1.GetChunk(1024, icString)
Do While Not bDone
strData = strData & vtData
DoEvents
vtData = Inet1.GetChunk(1024, icString)
If Len(vtData) = 0 Then
bDone = True
End If
Loop
Text1.Text = strData
End If
End Sub