set_time_limit(0);
session_start();
require("config.php");
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$cookie_jar2=tempnam("temp","C3");
$cookie_jar3=tempnam("temp","C4");
$array=array(
'answer'=>'',
'formhash'=>$_SESSION["hash"],
'loginfield'=>'username',
'loginsubmit'=>true,
'password'=>trim($_POST["password"]),
'questionid'=>0,
'seccodeverify'=>trim($_POST["code"]),
'username'=>trim($_POST["username"]),
);
$url=DZ."logging.php?action=login&loginsubmit=yes";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query($array));
curl_setopt($ch,CURLOPT_COOKIEFILE,$_SESSION["cookie_jar1"]);
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie_jar2);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_exec($ch);
curl_close($ch);
$url=DZ."index.php";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch,CURLOPT_COOKIEFILE,$cookie_jar2);
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie_jar3);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$html=curl_exec($ch);
curl_close($ch);
preg_match("/(?
echo $html."
";
}
?>
html文件
header("Content-Type:text/html;charset=utf-8");
?>
请先配置config.php,没有验证码的请直接忽略验证码,不支持中文帐号,仅作交流使用