Advertisement
RieqyNS13

Untitled

Jul 6th, 2014
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. $token = "token ente";
  3. function curl($url, $post=null){
  4.     $ch = curl_init();
  5.     curl_setopt($ch, CURLOPT_URL, $url);
  6.     if($post != null){
  7.         curl_setopt($ch, CURLOPT_POST, true);
  8.         curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  9.     }
  10.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  11.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  12.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  13.     $exec = curl_exec($ch);
  14.     curl_close($ch);
  15.     return $exec;
  16. }
  17. $curl = curl("https://api.instagram.com/v1/users/self/feed?access_token=".$token);
  18. $jancok = json_decode($curl);
  19. foreach($jancok->data as $data){
  20.     $gay = curl("https://api.instagram.com/v1/media/".$data->id."/likes", array("access_token"=>$token));
  21.     $jancok = json_decode($gay);
  22.     if($jancok->meta->code=="200")echo "sukses like\n";
  23.     else echo "gagal like\n";
  24.     sleep(2);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement