本帖最后由 爱疯 于 2012-7-17 10:33 编辑
[原创]
以前用VB向网页提交数据时总喜欢使用XMLHPPT对象,或查找网页的对象直接进行操作,效率相当的差,
如果不需要直接接收网页返回的数据,使用浏览器脚本直接POST,效率是相当的高的.
使用这种方法可以实现很高效率的自动登录论坛,自动循环灌水发帖,抢楼拿奖就更不在话下了,不过EP好象限制了发帖间隔必需超过10秒.共享个自动登录的代码,自动灌水的就免了,这个比较敏感...
Private Const sUser As String = "AAA11" '你的用户名 Private Const sPsw As String = "123456" '你的密码 Sub 登录EP() With CreateObject("InternetExplorer.Application") .Navigate "about:blank" With .Document .Open .write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312' /></head><body onload='abc.submit();'><form name='abc' action='http://www.excelpx.com/login.asp?action=chk' method='post' ><input style='width: 0px;height: 0px;' name='username' type='text' value='" & sUser & "'/><input style='width: 0px;height: 0px;' name='password' type='password' value='" & sPsw & "' /></form></body></html>" .Close End With .Refresh .Visible = True End With End Sub
[此贴子已经被作者于2010-2-10 19:17:03编辑过] |