首页 > 上网技巧 > 电脑小技巧 > 百度贴吧抢楼神器PHP版源代码

百度贴吧抢楼神器PHP版源代码

时间:2015-07-21 15:43 作者:QQ地带 我要评论

  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
  2. <?php 
  3. /* 注意 填入引号中! */ 
  4. $bduss="你的bduss";//填写你的bduss的值,前面不用带"bduss=" 
  5. $kw="贴吧名";//贴吧 
  6. $con="";//设置回复内容,留空则代表智能回复 
  7. $floor="1";//设置抢几楼,0代表2楼,1代表3楼! 
  8. $sleep="10";//设置延迟 
  9. /* 设置 */ 
  10. function get_list(){ 
  11.     global $bduss,$kw
  12.     $header = array ("Content-Type: application/x-www-form-urlencoded"); 
  13.     $data=array("BDUSS=".$bduss
  14.         "_client_id=wappc_1396611108603_817"
  15.         "_client_type=2"
  16.         "_client_version=5.7.0"
  17.         "_phone_imei=642b43b58d21b7a5814e1fd41b08e2a6"
  18.         "from=tieba"
  19.         "kw=".$kw
  20.         "pn=1"
  21.         "q_type=2"
  22.         "rn=50"
  23.         "with_group=1"); 
  24.     $data=implode("&"$data)."&sign=".md5(implode(""$data)."tiebaclient!!!"); 
  25.     $ch = curl_init(); 
  26.     curl_setopt($ch, CURLOPT_URL, "http://c.tieba.baidu.com/c/f/frs/page"); 
  27.     curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 
  28.     curl_setopt($ch, CURLOPT_HEADER, 0); 
  29.     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
  30.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
  31.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); 
  32.     curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
  33.     $re = json_decode(curl_exec($ch)); 
  34.     curl_close($ch); 
  35.     echo 'Author:<a href="http://www.giuem.com">Giuem</a><br>'
  36.     return $re
  37. function talk($content) { 
  38.     $re=file_get_contents("http://rmbz.net/Api/AiTalk.aspx?key=rmbznet&word=".$content); 
  39.     $re=json_decode($re)->content; 
  40.     return $re
  41. function url_get($url,$POSTcontent="",$cookie=""){ 
  42.     $ch = curl_init(); 
  43.     curl_setopt($ch, CURLOPT_URL,$url); 
  44.     if ($POSTcontent!=""){curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTcontent);} 
  45.     if ($cookie!=""){curl_setopt($ch, CURLOPT_COOKIE,$cookie);} 
  46.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
  47.     curl_setopt($ch, CURLOPT_HEADER, 0); 
  48.     curl_setopt($ch, CURLOPT_TIMEOUT, 20); 
  49.     $output = curl_exec($ch); 
  50.     curl_close($ch); 
  51.     return $output
  52. $re=get_list(); 
  53. $fid=$re->forum->id; 
  54. $re=$re->thread_list; 
  55. $a=count($re); 
  56. for($i=0;$i<$a;$i++){ 
  57.     $reply=$re[$i]->reply_num; 
  58.     $tid=$re[$i]->tid; 
  59.     if($reply==$floor){ 
  60.         $title=$re[$i]->title; 
  61.         $tbs=json_decode(url_get("http://tieba.baidu.com/dc/common/tbs","","BDUSS=".$bduss))->tbs;//www.oicqzone.com 
  62.         if($con==""){$content=talk($title);} else {$content=$con;} 
  63.         echo "title:".$title." reply:".$content.","
  64.         $text=url_get("http://tieba.baidu.com/f/commit/post/add","ie=utf-8&kw=".$kw."&fid=".$fid."&tid=".$tid."&tbs=".$tbs."&content=".$content,"BDUSS=".$bduss); 
  65.         if (strpos($text,'no":0,"')!="0"){echo "succeed<br>";} 
  66.            else {echo "fail<br>";} 
  67.         sleep($sleep);         
  68.     } 
  69. echo 'ok'
  70. ?> 

 


标签: php
顶一下
(2)
100%
踩一下
(0)
0%

Google提供的广告