Home > Backend Development > PHP Tutorial > PHP模拟登陆网站出现对话超时

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

WBOY
Release: 2016-06-13 12:39:26
Original
1266 people have browsed it

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 />
Copy after login

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

抓包如上图

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template