winhttp post登陆的问题
Private Sub Command2_Click()Const username As String = "seo123www"
Const password As String = "qazwsx123"
Dim vcode As String '验证码
With CreateObject("winhttp.winhttprequest.5.1")
.Open "GET", "http://bbss. & Int(1000 * Rnd), False
.send
vcode = Text3.Text '取出返回的验证码值,动态值,可自动识别,也可手动输入
.Open "POST", "http://bbss., False
.setrequestheader "Content-Type", "application/x-www-form-urlencoded"
.send "backurl=http%3A%2F%2Fbbss. & username & "&txtPassword=" & password & "&safecode=&randomcode=" & vcode & "&x=44&y=14"
'Debug.Print .responsetext
Debug.Print "backurl=http%3A%2F%2Fbbss. & username & "&txtPassword=" & password & "&safecode=&randomcode=" & vcode & "&x=44&y=14"
If InStr(.responsetext, username) Then
MsgBox "登录成功"
Else
MsgBox "登录失败"
End If
End With
End Sub
登陆不成功,求各位大神帮你
[ 本帖最后由 猎人seo 于 2015-1-29 11:28 编辑 ]