打开网页并自动输入用户名和密码自动登录的一个问题 本帖最后由 bcrun 于 2013-04-04 19:07:06 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 browser要等待网页加载完毕,还要考虑到框架及脚本,为什么不用xmlhttp模拟post包发送,下面是登陆代码,sendstr要通过抓包获得Dim xPost, sGet As Object Dim iRemote, sendstr, tempAs String Dim k As Integer Set xPost = CreateObject("Microsoft.XMLHTTP") Set sGet = CreateObject("ADODB.Stream") iRemote = "http://10.67.132.33/" sendstr = "Username=" & name & "Password=" & mima xPost.Open "post", iRemote, False xPost.setRequestHeader "Accept", "image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" xPost.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xPost.setRequestHeader "Accept-Language", "zh-cn" xPost.setRequestHeader "Accept-Encoding", "gzip, deflate" xPost.setRequestHeader "Referer", "http://10.67.132.33/" xPost.send (sendstr) If xPost.readyState = 4 Then If xPost.Status = 200 Then sGet.mode = 3 sGet.Type = 1 sGet.Open sGet.Write (xPost.responseBody) sGet.Position = 0 sGet.Type = 2 sGet.charset = "gb2312" ' "gb2312" temp = sGet.ReadText '返回的网页end ifend if 跨进程和子类化问题,有代码 心烦地吃了好多零食 各位大虾,小弟有一个关于VBA的问题,对我来说是超级难,请多多帮助 关于密码保护文件 VB的几个难题 打印照片的问题! 动态控件问题,有点难度!高手请进 着火了,快救救我呀!(怎么样来实现关闭ACCESS数据库) (100分)奇怪问题? 寻求资源文件的解决方案?****在线等候***** 哪位帮帮我啊,求助 VB播放WAV文件的问题
Dim xPost, sGet As Object
Dim iRemote, sendstr, tempAs String
Dim k As Integer
Set xPost = CreateObject("Microsoft.XMLHTTP")
Set sGet = CreateObject("ADODB.Stream")
iRemote = "http://10.67.132.33/"
sendstr = "Username=" & name & "Password=" & mima
xPost.Open "post", iRemote, False
xPost.setRequestHeader "Accept", "image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"
xPost.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xPost.setRequestHeader "Accept-Language", "zh-cn"
xPost.setRequestHeader "Accept-Encoding", "gzip, deflate"
xPost.setRequestHeader "Referer", "http://10.67.132.33/"
xPost.send (sendstr)
If xPost.readyState = 4 Then
If xPost.Status = 200 Then
sGet.mode = 3
sGet.Type = 1
sGet.Open
sGet.Write (xPost.responseBody)
sGet.Position = 0
sGet.Type = 2
sGet.charset = "gb2312" ' "gb2312"
temp = sGet.ReadText '返回的网页
end if
end if