xml发送数据请求的疑问
我想做一个自动登陆网站的程序
找到别人提供的范例
Option Explicit
Dim xml As New XMLHTTP
Private Sub Command1_Click()
Call AccessNet
End Sub
Private Sub AccessNet()
On Error Resume Next
Dim str1 As String
xml.open "POST", "http://yourWeb/handle.asp", False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xml.send "UserName=" & Text1.Text & "&Password=" & Text2.text
If xml.Status = 200 Then
str1 = StrConv(xml.responseBody, vbUnicode)'返回的内容
MsgBox str1
End If
End Sub
测试后发现好像没有起作用,最后返回的内容还是我登陆时的起始页面啊
望高手指点