republican 发表于 2010-10-21 09:52:01

请LZ反馈一下下列代码的结果,谢谢:#include <WinHttp_GetRespond.au3>
#include <array.au3>
$MyOpen=_WinHttpOpen()      

$Test = InputBox("请输入用户名","请输入用户名")
$rContext=_WinHTTP_GetRespond($MyOpen,"https://passport.sohu.com/jsonajax/checkusername.action?shortname="&$Test&"&domain=sohu.com&appid=8888&_t=1286978861640&mobileReg=false",2,2)
If @error Then MsgBox(48,"错误",$rContext)
$rContext=BinaryToString($rContext)
_ArrayDisplay($rContext)
MsgBox(0,"文件内容",$rContext)
Switch StringRegExpReplace(BinaryToString($rContext),'.*"status":"(\d+)".*','$1')
      Case 0
                MsgBox(64,"恭喜","该用户名并未被使用~")
      Case 1
                MsgBox(48,"抱歉","该用户名已经被使用!")
EndSwitch

_WinHttpCloseHandle($MyOpen)附件:
页: 1 [2]
查看完整版本: 高手帮我看一下, SOHU 的POST ,批量检测账号是否存在!