|
|
论坛里的视频方法不管用的。服务端似乎验证了lastpost的cookie。
在网上找了个curl登录也登录不上~~- $ch = curl_init();
- $data = array(
- 'pwuser' => 'lolfreeman' ,
- 'pwpwd' => 'aaaaaa',
- 'cktime' => '31536000');
- curl_setopt($ch, CURLOPT_COOKIEJAR, "D:/web/bbs/cookies.txt");
- curl_setopt($ch, CURLOPT_URL,"http://www.phpwind.net/login.php?");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- ob_start(); // prevent any output
- curl_exec ($ch); // execute the curl command
- ob_end_clean(); // stop preventing output
- curl_close ($ch);
- unset($ch);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, "D:/web/bbs/cookies.txt");
- curl_setopt($ch, CURLOPT_URL,"http://www.phpwind.net/index.php");
- $buf2 = curl_exec ($ch);
- curl_close ($ch);
- echo $buf2;
复制代码 达人帮忙分析下吧,谢谢! |
|