龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

CHINAZ站长论坛自动签到--让你每天都第一个签到

时间:2014-07-22 14:49来源: 作者: 点击:
分享到:
针对站长论坛的签到,用PHP的curl进行自动签到。
针对站长论坛的签到,用PHP的curl进行自动签到。
<?php
header("Content-type: text/html; charset=utf-8"); 
$index=isset($_GET['sid']) ? $_GET['sid'] : uniqid();
include 'helper/seostats.httprequest.php';
$p=dirname(__FILE__)."/cookie.txt";
$cookie_file=realpath($p);
if(!file_exists($cookie_file)){  //更换用户时请册除cookie.txt
touch("cookie.txt");
$cookie_file=realpath($p);
$postdate=array('username'=>'',   //这里填写你的用户名
		'password'=>'',  //这里填写你的密码
		'login'=>'登录',
		'returnurl'=>"http://www.chinaz.com/",
		'logintype'=>"username",
		'autologin'=>'autologin',
		);
HttpRequest::sendRequest("http://my.chinaz.com/login.html",$postdate,$cookie_file);	
}

$p = new HttpRequest();
$postdate=false;
$html = HttpRequest::getRequest("http://bbs.chinaz.com/signIn.html",$postdate,$cookie_file);
if(preg_match("/id=\"todaysay\"/", $html)){
	
	$postdate=array(
		'todaysay'=>"分类目录  http://www.opendir.cn ",   //这里就是签名内容
		'SignIn'=>"开始签到",
	);
	HttpRequest::getRequest("http://bbs.chinaz.com/signIn.html",$postdate,$cookie_file);
	flshpage();
}elseif(preg_match("/您今天已经签到过了/", $html)){
	echo "己签到";
	@unlink("cookie.txt");
	exit;
}else{
	echo "还没有开始".$index;
	flshpage();
}
function flshpage(){
$id = uniqid();
echo '<script>window.location.href="?sid='.$id.'"</script>';
}

//echo $html;	

2. [文件] sign.rar ~ 2KB     下载(48)     [全屏预览]

精彩图集

赞助商链接