电脑安全

您当前的位置:主页 > 电脑安全 >

php 模拟登陆-网络编程

来源:[db:来源]标题:   compatible    编辑:电脑技术全能网 时间:2019-09-23 06:23

原标题:php 模拟登陆-网络编程
   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;