首页 >后端开发 >php教程 > PHP模拟登陆网站出现对话超时

PHP模拟登陆网站出现对话超时

WBOY
WBOY原创
2016-06-13 12:39:261274浏览

PHP模拟登陆网站出现会话超时

<?php<br />
<br />
<br />
        $url="http://60.219.165.24/loginAction.do";<br />
        $ch = curl_init();<br />
        curl_setopt($ch, CURLOPT_URL, $url);<br />
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
	curl_setopt($ch, CURLOPT_HEADER, 0); <br />
	curl_setopt($ch, CURLOPT_POST, 1);<br />
	$curlPost="postdata";<br />
	curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost); <br />
<br />
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br />
<br />
         curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);<br />
<br />
         $output = curl_exec($ch);<br />
         curl_close($ch);<br />
$home_url = 'http://60.219.165.24/gradeLnAllAction.do?type=ln&oper=fainfo&fajhh=2615';<br />
	  header('Location: '.$home_url);<br />
<br />
<br />
?><br />

传入了正确的登陆名称和密码之后却无法访问下一页面。提示“会话超时".

抓包如上图

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn