关于Post用法
见以前的解决问题:http://autoitx.com/forum.php?mod=viewthread&tid=14508&highlight=%CD%F8%D2%B3post想登陆http://u.115.com这个网页,用httpwatch截取的如下:
POST /?action=login&goto=http%3A%2F%2Fu.115.com%2F%3Fac%3Dmy HTTP/1.1
Accept: */*
Referer: http://u.115.com/
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: my.115.com
Content-Length: 58
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: LCCK=isucko%40126.com; PHPSESSID=21aeef9f340b4d73789d5c4088e2898b
login%5Baccount%5D=isucko@126.com&login%5Bpasswd%5D=123456
lynfr8 给出了解答
$xmlhttp=ObjCreate("Microsoft.XMLHTTP")
$poststr="login%5Baccount%5D=isucko@126.com&login%5Bpasswd%5D=123456&login%5Btime%5D=on"
$xmlhttp.open("post","http://my.115.com/?action=login&goto=http%3A%2F%2Fmy.115.com",false)
$xmlhttp.setRequestHeader("Cache-Control", "no-cache")
$xmlhttp.setRequestHeader("Connection", "Keep-Alive")
$xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$xmlhttp.setRequestHeader("Referer","http://my.115.com/")
$xmlhttp.setRequestHeader("Cookie","AACK=MTI3MjQ2NjY0OHxiZTk5ZjdkNTg4MmI5NzlmYTUwMGI1NGQ5NzY3M2ExZQ%3D%3D")
$xmlhttp.send($poststr)
ShellExecute("http://my.115.com/")
我想知道
$xmlhttp.setRequestHeader("Cookie","AACK=MTI3MjQ2NjY0OHxiZTk5ZjdkNTg4MmI5NzlmYTUwMGI1NGQ5NzY3M2ExZQ%3D%3D")
中AACK=MTI3MjQ2NjY0OHxiZTk5ZjdkNTg4MmI5NzlmYTUwMGI1NGQ5NzY3M2ExZQ%3D%3D在哪里得到的?
页:
[1]