Advertisement
Guest User

botlike.php

a guest
Jun 15th, 2015
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <?php
  2.  
  3.   /**  dwisiswanto.my.id  **/
  4.   /*************************/
  5.  
  6. $brp = "100"; // Pengen diLike sampe berapa?
  7. $token = "CAA...."; // Access Token
  8.  
  9. function hajar($yuerel, $dataAing=null) {
  10.     $cuih = curl_init();
  11.     curl_setopt($cuih, CURLOPT_URL, $yuerel);
  12.     if($dataAing != null){
  13.         curl_setopt($cuih, CURLOPT_POST, true);
  14.         curl_setopt($cuih, CURLOPT_POSTFIELDS, $dataAing);
  15.     }
  16.     curl_setopt($cuih, CURLOPT_FOLLOWLOCATION, true);
  17.     curl_setopt($cuih, CURLOPT_RETURNTRANSFER, true);
  18.     curl_setopt($cuih, CURLOPT_SSL_VERIFYPEER, false);
  19.     $eks = curl_exec($cuih);
  20.     curl_close($cuih);
  21.     return $eks;
  22. }
  23.  
  24. $menta = hajar("https://graph.facebook.com/me/home?fields=id,from&limit=" . $brp . "&access_token=" . $token);
  25. $jason = json_decode($menta);
  26. foreach ($jason->data as $data) {
  27.     $kirim = hajar("https://graph.facebook.com/" . $data->id ."/likes", array(
  28.         "method" => "post",
  29.         "access_token" => $token));
  30.     $jason = json_decode($kirim);
  31.     if ($jason == 200)
  32.         echo "SUCCESS --> " . $data->id . " // From : " . $data->from->name . "\n";
  33.     else
  34.         echo "ERROR FOR ~ " . $data->id . "\n";
  35.     sleep(1);
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement