PHP模拟登陆网站出现会话超时
<?php<br /><br /><br /> $url="http://60.219.165.24/loginAction.do";<br /> $ch = curl_init();<br /> <em style="color:transparent">本文来源gao.dai.ma.com搞@代*码#网</em><a>搞代gaodaima码</a> 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 />
传入了正确的登陆名称和密码之后却无法访问下一页面。提示“会话超时”.
抓包如上图