本帖最后由 .個朲綉√ 于 2011-12-13 09:27 编辑
解决方法在6楼,用到的UDF传送门:http://www.autoitx.com/thread-18528-1-3.html
Post提交以后,下面是抓包获取到的头信息,我想获取Location后面的网址
搜索帖子,http://www.autoitx.com/forum.php?mod=viewthread&tid=21038
在这个帖子里,看到同样的问题,但用他的方法,还是没有解决,不知道问题出在哪里...HTTP/1.1 302 Found
Date: Thu, 01 Dec 2011 09:17:29 GMT
Server: IBM_HTTP_Server
Pragrma: no-cache
Expires: -1
P3P: CP=CAO PSA OUR
Set-Cookie: token=2sWzfxsVg_7Xm5eRD391A1b
Location: http://hn.ct10000.com:80/uam_uamChannel.do?url=http://hn.ct10000.com:80/service/account/service_DefaultInit.do?UATicket=B71314C15960A0271A768ADBD07802F7AF149FC798E492E2734F61D225AB8A7D
Content-Length: 0
Cache-Control: no-store, no-cache=set-cookie
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/plain
Content-Language: zh-CN
下面是我的Au3代码,请各位指教,谢谢!!
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.SetTimeouts(15000,15000,15000,15000)
$oHTTP.Option(4) = 13056
$oHTTP.option(6)=0
$oHTTP.Open("post","http://uam.hn.ct10000.com/LoginIn",False) ;GET 提交的地址
$oHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Referer", "http://uam.hn.ct10000.com/login-hn.jsp?bussiType=1&redirectUrl=http://hn.ct10000.com:80/uam_uamChannel.do?url=http://hn.ct10000.com:80/service/account/service_DefaultInit.do&sysCode=19101&trandId=")
$oHTTP.setRequestHeader("Accept-Encoding", "gzip, deflate")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn")
$oHTTP.setRequestHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET4.0C; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)")
$oHTTP.Send($sDataToSend)
$Location1=$oHTTP.getResponseHeader("Location") ;这个是GET后服务器返回的 头信息~
MsgBox(0,'',$Location1)
$oHTTP=0
|