原本是暑假时候无聊弄得,两天刷进内内测组也是很爽,然后...MIUI9 MI5s并不是第一批公测然后就感觉内测组毫无卵用了,有想要进内测组玩玩(zhuangbi)的可以看下~其实是开学后不知道发些啥了23333
自动回复时取的标题然后用图灵傻傻的API回复的 基本回复很智障 建议频率不要设置太高,刷的时间不要太长混进内测就停了吧,以免被禁言~
代码写的很渣,欢迎各种提意见~~
<?php /* Power By Ihuan.me */ $cookie = ''; function fetch($url,$refer,$post){ global $cookie; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_REFERER, $refer); curl_setopt($ch, CURLOPT_COOKIE,$cookie); if($post!=''){ curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 BIDUBrowser/8.3 Safari/537.36"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $re = curl_exec($ch); curl_close($ch); return $re; } preg_match_all('/<a .*?href="(.*?)".*?>/is',fetch('http://www.miui.com/forum.php?gid=14&page='.rand(1,24),'http://www.miui.com/index.html'),$match); foreach($match['1'] as $key=>$val){ if(FALSE === strpos($val, 'thread-')){ unset($match['1'][$key]); }else{ if(!strpos($val, '-1-1.html')){ unset($match['1'][$key]); } } } $url = array_values(array_flip(array_flip($match['1']))); $url = 'http://www.miui.com/'.$url[rand(1,24)]; $html = fetch($url,'http://www.miui.com/index.html'); preg_match_all('/action=\"(.*?)\"/',$html,$match); $reply = $match[1][1]; preg_match_all('/<input type="hidden" name="formhash" value="(.*?)" \/>/',$html,$match); $hash = $match[1][1]; preg_match_all('/<meta name="description" content="(.*?)"\/>/',$html,$match); $content = $match[1][0]; $data = json_decode(fetch('http://www.tuling123.com/openapi/api?key=0344bd2d86f33bda5654b941f757137a&info='.$content),true); $post = array('message'=>$data['text'],'posttime'=>time(),'formhash'=>$hash,'usesig'=>1,'subject'=>''); fetch(str_replace('&','&','http://www.miui.com/'.$reply.'&inajax=1'),$url,$post); ?>
$cookie填上自己的Cookie,0级的就不要用了,有验证码回复不了的2333
发个小东西,诈尸假装自己还存在着~开了学就国庆放了两天,orz
php5.3下依旧报错呢
2018年4月11日 21:34PHP Warning: Missing argument 3 for fetch(), called in E:\wwwroot\host804043465\wwwroot\index.php on line 69 and defined in E:\wwwroot\host804043465\wwwroot\index.php on line 51
PHP Warning: Missing argument 3 for fetch(), called in E:\wwwroot\host804043465\wwwroot\index.php on line 81 and defined in E:\wwwroot\host804043465\wwwroot\index.php on line 51
PHP Warning: Missing argument 2 for fetch(), called in E:\wwwroot\host804043465\wwwroot\index.php on line 88 and defined in E:\wwwroot\host804043465\wwwroot\index.php on line 51
PHP Warning: Missing argument 3 for fetch(), called in E:\wwwroot\host804043465\wwwroot\index.php on line 88 and defined in E:\wwwroot\host804043465\wwwroot\index.php on line 51
Warning: Missing argument 3 for fetch(), called in C:\phpStudy\PHPTutorial\WWW\miui.php on line 24 and defined in C:\phpStudy\PHPTutorial\WWW\miui.php on line 6
Warning: Missing argument 3 for fetch(), called in C:\phpStudy\PHPTutorial\WWW\miui.php on line 36 and defined in C:\phpStudy\PHPTutorial\WWW\miui.php on line 6
Warning: Missing argument 2 for fetch(), called in C:\phpStudy\PHPTutorial\WWW\miui.php on line 43 and defined in C:\phpStudy\PHPTutorial\WWW\miui.php on line 6
Warning: Missing argument 3 for fetch(), called in C:\phpStudy\PHPTutorial\WWW\miui.php on line 43 and defined in C:\phpStudy\PHPTutorial\WWW\miui.php on line 6
请问这个是什么原因?百度了好久没有找到答案
2018年1月17日 22:39换低版本php或者自己改一下fetch
2018年1月20日 18:12cookie不知道选择哪一个。报错Parse error: syntax error, unexpected T_STRING
2017年12月22日 11:08图灵机器人啊,很早以前用过
2017年11月28日 13:58技术高手呀,赞博主
2017年11月13日 22:06技术高手呀,赞博主
2017年11月13日 22:06看看你
2017年11月1日 17:29小伙子 好好学习 祖国的未来是你们年轻人的 哈哈哈
2017年11月1日 17:27cookie取得不知道是不是不对的原因,运行PHP是空白页面,回帖也没增加
2017年10月29日 11:06检查一下cookie 另外这段代码是在php5.3下写的 其他版本不确定正常。。
2017年10月30日 10:54我的也是这种情况耶,php5.3下运行的,虚拟机。cookie获取的没问题啊!介意私下交流一下嘛?邮箱电话就是微信!
2018年11月24日 22:19沙发
2017年10月26日 14:07