首頁 >後端開發 >php教程 > PHP模拟登陆网站出现对话超时

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

WBOY
WBOY原創
2016-06-13 12:39:261268瀏覽

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