- UID
- 1
- 帖子
- 11122
- 积分
- 7224
- 紫菀
- 102 朵
- 花瓣
- 9777 片
- 花蕊
- 1613 朵
- 野草莓
- 301 个
- 蒲公英
- 491 朵
- 社区等级
- 200 级
- 在线时间
- 5246 小时
- 注册时间
- 2006-7-9
- 蜗居何地
- 浙江台州
- 登录状态
-
当前离线
|
楼主
发表于 2006-12-5 02:29
| 只看该作者
呵呵!懂的用的话就可以用真实的QQ刷人气了
vbs的xmlHttp实用程序的经典函数
Set xmlHttp = CreateObject("microsoft.xmlhttp")
Set oShell = CreateObject("WScript.Shell")
sCurrDir = oShell.CurrentDirectory
Function GetPage(Method,Url,Async,PostContent,FileName)
xmlHttp.open Method,Url,Async
If Method = "POST" Then
xmlhttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlhttp.setRequestHeader "Content-Length",Len(PostContent)
End If
xmlHttp.send(PostContent)
If Async = False Then GetPage = BytesToBstr(xmlHttp.responseBody,"GB2312",FileName) Else GetPage = ""
End Function
Function BytesToBstr(body,Cset,FileName)
Set objstream = CreateObject("ADODB.Stream")
with objstream
.Type = 1
.Mode =3
.Open
.Write body
If not trim(FileName)="" Then .SaveToFile LCase(FileName),2
.Position = 0
.Type = 2
.Charset = Cset
End With
BytesToBstr = objstream.ReadText
objstream.Close
End Function
使用方法:
GetPage(提交方法, 提交URL, 是否异步, POST内容, [另存为文件名])
几乎封装了一切可用的,呵呵。以后用xmlHttp做刷网页,破密码等,都是很简单的调用了。效率很高,直接继承了IE的Cookie。 |
|