xmlhttp和winhttp那个效率高点啊
本帖最后由 huhete 于 2012-2-21 12:16 编辑我想发送数据包,获得返回信息然后进行处理 可以 很容易
$oHTTP = ObjCreate("MSXML2.XMLHTTP")
$oHTTP.Open("POST", "http://www.?????????????.com/ajaxpro/NewsSignIn_Default2,App_Web_40ndcq0r.ashx", False)
$oHTTP.setRequestHeader("Accept", "*/*")
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn")
$oHTTP.setRequestHeader("x-ajaxpro-method", "get_signinOnclick")
$oHTTP.setRequestHeader("Accept-Encoding", "gzip, deflate")
$oHTTP.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)")
$oHTTP.setRequestHeader("Content-Type", "text/plain; charset=utf-8")
$oHTTP.setRequestHeader("Referer", "http://www.????????????.com/NewsSignIn/signIn.aspx?ClientSerial=05000100)
$needsend = 'ClientSerial=05000100' & $macis & '0000' & $macs2 & '&UserID=' & $id
$oHTTP.Send($needsend);post数据
$a = BinaryToString($oHTTP.responsebody)
MsgBox(0,$a,$needsend) ;返回值 xmlhttp有一套专门的udf,不用自己创建对象这么麻烦 回复 3# netegg
有没有例子 回复 4# huhete
例子不太清楚,没细看过 请高手回答下吧 感觉xmlhttp还是比较好用
页:
[1]