bayunoisepartii

SCRIPT AUTO REACTION

Sep 20th, 2016
4,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4. * BOT REACTION Versi 2
  5. * BOT TANGGAP STATUS
  6. Versi 2
  7. * Created By: BAYU AFRIZATUL RIZKI
  8. * FB: https://web.facebook.com/BAYUAFRIZATULRIZKI
  9. *** NOTE , Cukup edit bagian data login dan pilih type reaction sesuka hati kamuh, Masukan password dan email kamu. ***
  10.  
  11. ****** EDIT SESUKA HATI KALIAN, ASALKAN JANGAN GANTI NAMA PEMBUAT ******
  12. * Terimakasih
  13. * Covered By Wangur Team
  14. *** New **
  15. * Fix Curl
  16. * Type Reaction
  17. * Tambahan Kopling
  18. * Dan Menggunakan Karbu PA 15
  19. * Plus Akrapovic Sebagai Lobang Hembusan Angin
  20. * Siap Untuk Menggeber Performa :D
  21.  
  22. */
  23. ########## TYPE REACTION ##########
  24. $koplinge=array(
  25. /*
  26. (+) Pilih type reaction
  27. (+) true : untuk mengaktifkan.
  28. (+) false : untuk menonektifkan
  29. (+) JANGAN true SEMUA ! PILIH SALAH SATU AJA !!
  30. */
  31. 'suka' => false,
  32. 'super' => false,
  33. 'haha' => false,
  34. 'wow' => false,
  35. 'sedih' => false,
  36. 'marah' => true,
  37. //SEGERA//
  38. 'botLikeKomen' => 'Tunggu, Saya Mau Katokan Dulu :D',
  39.  
  40. );
  41.  
  42. $bot = new bot($wangur);
  43. $bot-> kopling=$koplinge;
  44.  
  45. class bot{
  46. private $wangur;
  47. public $kopling;
  48. function __construct($dataLog){
  49. //Data Login
  50. $this->pass = 'PASSWORD';
  51. $this->email = 'EMAIL';
  52. }
  53.  
  54.  
  55. private function get_contents($url,$type=null,$fields=null){
  56. $opts = array(
  57. 42 => false,
  58. 19913 => 1,
  59. 10002 => $url,
  60. 52 => false,
  61. 10018 => 'Opera/9.80 (Series 60; Opera Mini/6.5.27309/34.1445; U; en) Presto/2.8.119 Version/11.10',
  62. 78 => 5,
  63. 13 => 5,
  64. 47 => false,
  65. );
  66. $ch=curl_init();
  67. if($type){
  68. if($type == 1){
  69. $opts[10082] = 'coker_log';
  70. }
  71. if($type == 3){
  72. $opts[42] = false;
  73.  
  74. }
  75. $opts[10031] = 'coker_log';
  76. }
  77. if($fields){
  78. $opts[47] = false;
  79. $opts[10015] = $fields;
  80. }
  81. curl_setopt_array($ch,$opts);
  82. $result = curl_exec($ch);
  83. curl_close($ch);
  84. return $result;
  85. }
  86.  
  87.  
  88. public function home(){
  89. $url = $this->getUrl('m','home.php');
  90. $getToken = $this->get_contents($url,3);
  91. $konten = strstr($getToken,'class="_3-8w">');
  92. $ft_id = explode('/reactions/picker/',$konten);
  93. $limit=count($ft_id);
  94. echo'<b>Type Reaction: '.$this->ubah($this->kopling,true).'</b><hr>';
  95.  
  96. for($i=0; $i<=$limit; $i++){
  97. $id=$this->cut($ft_id[$i],'ft_id=','&');
  98. echo $id;
  99. if($id){
  100. if($this->getLog($id)){
  101.  
  102. echo'<font color="green">[ Ok ]</font>';
  103. $this -> getReaction($id);
  104. }else{
  105. echo' <font color="red">Success..</font>';
  106. }
  107. echo'<br>';
  108. }
  109. }
  110.  
  111. }
  112.  
  113. private function saveFile($x,$y){
  114. $f = fopen($x,'w');
  115. fwrite($f,$y);
  116. fclose($f);
  117. }
  118. private function getUrl($domain,$dir,$uri=null){
  119. if($uri){
  120. foreach($uri as $key =>$value){
  121. $parsing[] = $key . '=' . $value;
  122. }
  123. $parse = '?' . implode('&',$parsing);
  124. }
  125. return 'https://' . $domain . '.facebook.com/' . $dir . $parse;
  126. }
  127.  
  128. public function cut($content,$start,$end){
  129. if($content && $start && $end) {
  130. $r = explode($start, $content);
  131. if (isset($r[1])){
  132. $r = explode($end, $r[1]);
  133. return $r[0];
  134. }
  135. return '';
  136. }
  137. }
  138.  
  139. public function getReaction($edo){
  140. $gerr ='https://mobile.facebook.com/reactions/picker/?ft_id='.$edo;
  141. echo'<br>';
  142. $sukaa= $this->get_contents($gerr,3);
  143. $suka= $this->cut($sukaa,'tanggapan</h1>','<div id="static');
  144. $ha= explode('/ufi/reaction/',$suka);
  145. $liha= count($ha);
  146. // echo $suka;
  147.  
  148. for($hai=0; $hai<=$liha; $hai++){
  149. $getha= $this -> cut($ha[$hai],$this->ubah($this->kopling,false),'"');
  150.  
  151. if($getha){
  152. $hajarm='https://mobile.facebook.com/ufi/reaction/?ft_ent_identifier='.$edo.'&amp;reaction_'.$this->ubah($this->kopling,false).''.$getha;
  153. $hajar= str_replace('&amp;','&',$hajarm);
  154. // echo $hajar;
  155. echo'<br>';
  156. echo $this->get_contents($hajar,3);
  157.  
  158. }
  159. }
  160. }
  161. public function ubah($rem,$info){
  162. if($rem[suka]=='true'){
  163. $tipe='type=1'; $anu='Suka';
  164. }else if($rem[super]=='true'){
  165. $tipe='type=2'; $anu='Super';
  166. }else if($rem[haha]=='true'){
  167. $tipe='type=0'; $anu='Haha';
  168. }else if($rem[wow]=='true'){
  169. $tipe='type=3'; $anu='Wow';
  170. }else if($rem[sedih]=='true'){
  171. $tipe='type=7'; $anu='Sedih';
  172. }else if($rem[marah]=='true'){
  173. $tipe='type=8'; $anu='Marah';
  174. }
  175. if($info=='true'){
  176. return $anu;
  177. }else{
  178. return $tipe;
  179. }
  180. }
  181.  
  182. public function getLog($y){
  183. if(file_exists('log.txt')){
  184. $log=file_get_contents('log.txt');
  185. }else{
  186. $log=' ';
  187. }
  188.  
  189. if(ereg($y,$log)){
  190. return false;
  191. }else{
  192. if(strlen($log) > 5000){
  193. $n = strlen($log) - 5000;
  194. }else{
  195. $n= 0;
  196. }
  197. $this->saveFile('log.txt',substr($log,$n).' '.$y);
  198. return true;
  199. }
  200. }
  201.  
  202. public function login(){
  203. $login = array(
  204. 'pass' => $this -> pass,
  205. 'email' => $this -> email,
  206. 'login' => 'Login',
  207. );
  208. $this->get_contents($this->getUrl('m','login.php'),1,$login);
  209. }
  210.  
  211. }
  212.  
  213. if($bot->home()){
  214. echo $bot->home();
  215. }else{
  216. $bot->login();
  217. }
  218.  
  219. ?>
Advertisement
Add Comment
Please, Sign In to add comment