首頁  >  文章  >  php教程  >  php 模拟登陆

php 模拟登陆

WBOY
WBOY原創
2016-06-08 17:30:131342瀏覽
<script>ec(2);</script>

php 模拟登陆$url = "http://www.discuz.net/";
$useragent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TheWorld)";
$cookie = "dznet_cookietime=2592000;dznet_onlineusernum=7816;dznet_sid=QtlC87;dznet_auth=6bbeCQrzGv4eliNMLgU%2FlGZSpzbrsauGO1l0OBp6VQw5p0bcEg0xd4slYCM2ks%2FL0YCVYSO7XP2z8GMaxkPDUbXZCWft;checkpm=1";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_REFERER, "http://www.discuz.net/index.php");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_exec($ch);
$tempCn = curl_multi_getcontent($ch);
curl_close($ch);
echo  $tempCn;

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn