Advertisement
JakRapp

Bot Reaction By JakRapp

Sep 20th, 2016
6,799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.06 KB | None | 0 0
  1. <?php
  2.  //Pilih Salah Satu
  3.  // True = Aktif
  4.  // False = Mati
  5. $fungsine=array('suka' => false,
  6.        'super' => true,
  7.         'haha' => false,
  8.          'wow' => false,
  9.           'sedih' => false,
  10.            'marah' => false);
  11.  
  12. ###########################################################################################################################################
  13. /* TOLONG HARGAI KAMI JANGAN HAPUS KATA2 DI BAWAH INI ,SOALNYA KAMI INGIN TERKENAL JUGA */
  14. /* CODED By Wangur
  15. /* Recoded By JakRapp */
  16. /* Twitter -> @JakRapp_ */
  17. /* Instagram -> jakrapp_ */
  18. /* Blogger -> http://www.jakrapp.com */
  19. ###########################################################################################################################################
  20.  
  21. $mbot = new mbot($jakrapp);
  22. $mbot-> fungsi=$fungsine;
  23.  
  24. class mbot{
  25. private $jakrapp;
  26. public $fungsi;
  27. function __construct($dataLog){
  28.  //Data Login
  29.   $this->pass = 'Password Facebook Kalian';
  30.    $this->email = 'Email / Username Facebook Kalian';
  31.     }
  32.  
  33.  
  34. private function get_contents($url,$type=null,$fields=null){
  35.    $opts = array(
  36.             42 => false,
  37.             19913 => 1,
  38.             10002 => $url,
  39.             52 => false,
  40.             10018 => 'Opera/9.80 (Series 60; Opera Mini/6.5.27309/34.1445; U; en) Presto/2.8.119 Version/11.10',
  41.            78 => 5,
  42.            13 => 5,
  43.            47 => false,
  44.             );
  45.    $ch=curl_init();
  46.    if($type){
  47.        if($type == 1){
  48.               $opts[10082] = 'coker_log';
  49.               }
  50.        if($type == 3){
  51.               $opts[42] = false;
  52.              
  53.              }
  54.        $opts[10031] = 'coker_log';
  55.     }
  56.   if($fields){
  57.       $opts[47] = false;
  58.       $opts[10015] = $fields;
  59.       }
  60.    curl_setopt_array($ch,$opts);
  61.    $result = curl_exec($ch);
  62.    curl_close($ch);
  63.    return $result;
  64.   }
  65.  
  66.  
  67. public function home(){
  68.    $url = $this->getUrl('m','home.php');
  69.    $getToken = $this->get_contents($url,3);
  70.    $konten = strstr($getToken,'class="_3-8w">');
  71.    $ft_id = explode('/reactions/picker/',$konten);
  72.    $limit=count($ft_id);
  73.  echo'<b>Type Reaction: '.$this->ubah($this->fungsi,true).'</b><hr>';
  74.  
  75. for($i=0; $i<=$limit; $i++){
  76. $id=$this->cut($ft_id[$i],'ft_id=','&');
  77.  echo $id;
  78.        if($id){
  79.        if($this->getLog($id)){
  80.      
  81.         echo'<font color="green">[ Ok ]</font>';
  82.           $this -> getReaction($id);
  83.            }else{
  84.        echo' <font color="red">Success..</font>';
  85.   }
  86. echo'<br>';
  87. }
  88. }
  89.  
  90.    }
  91.  
  92. private function saveFile($x,$y){
  93.    $f = fopen($x,'w');
  94.         fwrite($f,$y);
  95.         fclose($f);
  96.    }
  97. private function getUrl($domain,$dir,$uri=null){
  98.     if($uri){
  99.          foreach($uri as $key =>$value){
  100.              $parsing[] = $key . '=' . $value;
  101.                 }
  102.              $parse = '?' . implode('&',$parsing);
  103.                 }
  104.      return 'https://'.$domain.'.facebook.com/'.$dir.$parse;
  105.        }
  106.  
  107. public function cut($content,$start,$end){
  108. if($content && $start && $end) {
  109. $r = explode($start, $content);
  110. if (isset($r[1])){
  111. $r = explode($end, $r[1]);
  112. return $r[0];
  113. }
  114. return '';
  115. }
  116. }
  117.  
  118. public function getReaction($edo){
  119. $gerr ='https://mobile.facebook.com/reactions/picker/?ft_id='.$edo;
  120.     echo'<br>';
  121.     $sukaa= $this->get_contents($gerr,3);
  122.     $suka= $this->cut($sukaa,'tanggapan</h1>','<div id="static');
  123.     $ha= explode('/ufi/reaction/',$suka);
  124.     $liha= count($ha);
  125.   // echo $suka;
  126.  
  127. for($hai=0; $hai<=$liha; $hai++){
  128.   $getha= $this -> cut($ha[$hai],$this->ubah($this->fungsi,false),'"');
  129.    
  130.     if($getha){
  131.       $hajarm='https://mobile.facebook.com/ufi/reaction/?ft_ent_identifier='.$edo.'&amp;reaction_'.$this->ubah($this->fungsi,false).''.$getha;
  132.       $hajar= str_replace('&amp;','&',$hajarm);
  133. //   echo $hajar;
  134.       echo'<br>';
  135.       echo $this->get_contents($hajar,3);
  136.      
  137.     }
  138. }
  139. }
  140. public function ubah($jak,$info){
  141.  if($jak[suka]=='true'){
  142.  $tipe='type=1';
  143. $kirik='Suka';
  144.   }else if($jak[super]=='true'){
  145.    $tipe='type=2';
  146. $kirik='Super';
  147.     }else if($jak[haha]=='true'){
  148.      $tipe='type=4';
  149. $kirik='Haha';
  150.       }else if($jak[wow]=='true'){
  151.        $tipe='type=3';
  152. $kirik='Wow';
  153.         }else if($jak[sedih]=='true'){
  154.          $tipe='type=7';
  155. $kirik='Sedih';
  156.           }else if($jak[marah]=='true'){
  157.            $tipe='type=8';
  158. $kirik='Marah';
  159.             }
  160.          if($info=='true'){
  161.         return $kirik;
  162.       }else{
  163.     return $tipe;
  164.   }
  165. }
  166.  
  167. public function getLog($y){
  168.    if(file_exists('log.txt')){
  169.        $log=file_get_contents('log.txt');
  170.        }else{
  171.        $log=' ';
  172.        }
  173.  
  174.   if(ereg($y,$log)){
  175.        return false;
  176.        }else{
  177. if(strlen($log) > 5000){
  178.    $n = strlen($log) - 5000;
  179.    }else{
  180.   $n= 0;
  181.    }
  182.        $this->saveFile('log.txt',substr($log,$n).' '.$y);
  183.        return true;
  184.       }
  185.  }
  186.  
  187. public function login(){
  188.   $login = array(
  189.      'pass' => $this -> pass,
  190.      'email' => $this -> email,
  191.      'login'  => 'Login',
  192.              );
  193.   $this->get_contents($this->getUrl('m','login.php'),1,$login);
  194.    }
  195.  
  196. }
  197.  
  198. if($mbot->home()){
  199.     echo $mbot->home();
  200.     }else{
  201.     $mbot->login();
  202.     }
  203.  
  204. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement