CHINAZ站长论坛自动签到--让你每天都第一个签到
针对站长论坛的签到,用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;
- 上一篇:教你如何加密一个php页面
- 下一篇:简单的PHP web文件分享
精彩图集
精彩文章