- <?php
- include("./snoopy.class.php");
- $check_url=''; //配置任务URL
- $bank_url=''; //银行URL
- auto_job($check_url,7,18); //后面二个数字代表每7个任务..需要18点精力.(如果是运行最后一个任务..需要修改下面...)
- auto_bank($bank_url); //运行任务OK后存钱.
- function auto_bank($url)
- {
- $snoopy= new Snoopy();
- $snoopy->accept="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
- $snoopy->_httpversion = "HTTP/1.1";
- $snoopy->agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19";
- $snoopy->fetch($url);
- $text= $snoopy->results;
- preg_match("/form(.*)<\/form>(.*)<\/form>/",$text,$match);
- $form=$match[1];
- $form=str_replace("amp;","",$form);
- $urll=explode("&",$url);
- $action=$urll[0];
- preg_match_all("/name="(\S*)" value="(\S*)">/",$form,$match);
- $form_name=$match[1];
- $form_value=$match[2];
- $form_action=array();
- for($n=0;$n<count($form_name);$n++){
- $form_action[$form_name[$n]]=$form_value[$n];
- }
- //print_r($form_action);exit;
- $snoopy= new Snoopy();
- $snoopy->referer = $url;
- //$snoopy->set_submit_multipart();
- $snoopy->accept="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
- $snoopy->_httpversion = "HTTP/1.1";
- $snoopy->agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19";
- $snoopy->submit($action,$form_action);
- }
- function auto_job($url,$job_num,$jl)
- {
- $snoopy= new Snoopy();
- $snoopy->accept="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
- $snoopy->_httpversion = "HTTP/1.1";
- $snoopy->agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19";
- $snoopy->fetch($url);
- $text= $snoopy->results;
- preg_match("/<\/td><td class="energy">(.*)(\d{2})\/(\d+)<\/td><td class="strength">/",$text,$match);
- $jl_now=$match[2];
- $jl_max=$match[3];
- if ($jl_now < $jl) {
- return "no jl $jl_now";
- }
- $jj=$job_num+1;
- $ereg="/<form name="form_job".$job_num.""(.*)<\/form>(.*)form_job".$jj."/"; //非最后一个任务时使用
- //$ereg="/<form name="form_job".$job_num.""(.*)<\/form>/"; //最后一个任务时使用
- preg_match($ereg,$text,$match);
- $form=$match[1];
- $form=str_replace("amp;","",$form);
- $urll=explode("&",$url);
- $action=$urll[0];
- preg_match_all("/name="(\S*)" value="(\S*)">/",$form,$match);
- $form_name=$match[1];
- $form_value=$match[2];
- $form_action=array();
- for($n=0;$n<count($form_name);$n++){
- $form_action[$form_name[$n]]=$form_value[$n];
- }
- $snoopy= new Snoopy();
- $snoopy->referer = $url;
- $snoopy->accept="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
- $snoopy->_httpversion = "HTTP/1.1";
- $snoopy->agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19";
- $snoopy->submit($action,$form_action);
- return "OK";
- }
- ?>
复制代码
现在里面四个级别最高的..全是使用挂机挂 出来的.... |