首页 >php教程 >php手册 >php 模仿用户登陆读取DZ 论坛验码程序-3

php 模仿用户登陆读取DZ 论坛验码程序-3

WBOY
WBOY原创
2016-06-13 10:09:311104浏览

error_reporting(0);
session_start();
header("Content-Type:text/html;charset=utf-8");
require("config.php");
$_SESSION["cookie_jar1"]=tempnam("temp","C2");
$url=DZ."ajax.php?inajax=1&action=checkseccode&seccodeverify=".$_GET["code"];
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_COOKIEFILE,$_SESSION["cookie_jar"]);
curl_setopt($ch,CURLOPT_COOKIEJAR,$_SESSION["cookie_jar1"]);
$html=curl_exec($ch);
preg_match("/(? if($charset[0]!=="utf-8")
{
 $html=iconv($charset[0],"utf-8",$html);
}
curl_close($ch);
preg_match("/(? echo $outs[0];
?>

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn