RieqyNS13 icon

Untitled

RieqyNS13 | PRO | 07/06/14 05:13:50 PM UTC | 0 ⭐ | 631 👁️ | Never ⏰ | []
PHP |

810 B

|

None

|

0 👍

/

0 👎

<?php 
$token = "token ente";
function curl($url, $post=null){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    if($post != null){
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    }
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $exec = curl_exec($ch);
    curl_close($ch);
    return $exec;
}
$curl = curl("https://api.instagram.com/v1/users/self/feed?access_token=".$token);
$jancok = json_decode($curl);
foreach($jancok->data as $data){
    $gay = curl("https://api.instagram.com/v1/media/".$data->id."/likes", array("access_token"=>$token));
    $jancok = json_decode($gay);
    if($jancok->meta->code=="200")echo "sukses like\n";
    else echo "gagal like\n";
    sleep(2);
}

Comments