GLADzTeguhID

BOT LIKE FB + KOMEN FB

Sep 28th, 2016
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.04 KB | None | 0 0
  1. <?php
  2. /*
  3. ©2016 (==| Coding-ID |==)
  4. Yang ganti copyright berarti Gak Tamvan
  5. */
  6. $access_token = file_get_contents("my_token.txt"); // Buat File my_token.txt Dan isi token mu
  7. function auto($url)
  8. {
  9.     $data = curl_init();
  10.     curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
  11.     curl_setopt($data, CURLOPT_URL, $url);
  12.     $hasil = curl_exec($data);
  13.     curl_close($data);
  14.     return $hasil;
  15. }
  16.  
  17. if (file_exists('badai_status')) {
  18.     $log = json_encode(file('badai_status'));
  19. } else {
  20.     $log = '';
  21. }
  22. if (file_exists('badai_komen')) {
  23.     $log2 = json_encode(file('badai_komen'));
  24. } else {
  25.     $log2 = '';
  26. }
  27. $stat = json_decode(auto('https://graph.fb.me/me/home?fields=id&limit=50&access_token=' . $access_token), true);
  28. for ($i = 1; $i <= count($stat[data]); $i++) {
  29.     if (!ereg($stat[data][$i - 1][id], $log)) {
  30.         $x = $stat[data][$i - 1][id] . "\n";
  31.         $y = fopen('badai_status', 'a');
  32.         fwrite($y, $x);
  33.         fclose($y);
  34.         auto('https://graph.fb.me/' . $stat[data][$i - 1][id] . '/likes?method=post&access_token=' . $access_token);
  35.         echo '<span style="color:#0E0101">' . $stat[data][$i - 1][id] . '</span> <span style="color:green"> Like Status OK </span><hr/>';
  36.     } else {
  37.         $badai = json_decode(auto('https://graph.fb.me/' . $stat[data][$i - 1][id] . '/comments?fields=id&access_token=' . $access_token), true);
  38.         for ($e = 1; $e <= count($badai[data]); $e++) {
  39.             if (!ereg($badai[data][$e - 1][id], $log2)) {
  40.                 $q = $badai[data][$e - 1][id] . "\n";
  41.                 $w = fopen('badai_komen', 'a');
  42.                 fwrite($w, $q);
  43.                 fclose($w);
  44.                 auto('https://graph.fb.me/' . $badai[data][$e - 1][id] . '/likes?method=post&access_token=' . $access_token);
  45.                 echo ('id komen : ' . $badai[data][$e - 1][id] . ' <span style="color:green"> Like komen OK </span><hr/>');
  46.             }
  47.         }
  48.     }
  49. }
  50. echo ('<a span style="color:green" href="http://nyariscript.blogspot.com/" target="_blank">(==| Coding-ID |==)</span>');
  51. ?>
Add Comment
Please, Sign In to add comment