找回密码
 加入
搜索
查看: 2773|回复: 0

[IE类操作] 关于Post用法

[复制链接]
发表于 2011-12-15 17:03:37 | 显示全部楼层 |阅读模式
见以前的解决问题:http://autoitx.com/forum.php?mod ... ht=%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在哪里得到的?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 21:24 , Processed in 0.088380 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表