请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[0]=BinaryToString($rContext[0])
_ArrayDisplay($rContext)
MsgBox(0,"文件内容",$rContext[0])
Switch StringRegExpReplace(BinaryToString($rContext[0]),'.*"status":"(\d+)".*','$1')
Case 0
MsgBox(64,"恭喜","该用户名并未被使用~")
Case 1
MsgBox(48,"抱歉","该用户名已经被使用!")
EndSwitch
_WinHttpCloseHandle($MyOpen)
附件:
|