PHP imitates user login and reads DZ forum code verification program-3_PHP tutorial

WBOY
Release: 2016-07-13 17:07:03
Original
1267 people have browsed it

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("/(?<=encoding=").*?(?=")/",$html,$charset);
if($charset[0]!=="utf-8")
{
 $html=iconv($charset[0],"utf-8",$html);
}
curl_close($ch);
preg_match("/(?<=CDATA[).*?(?=])/",$html,$outs);
echo $outs[0];
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/630548.htmlTechArticleerror_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=1action=che...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!