Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $token = file_get_contents("token.txt");
- $ips = '104.219.248.23';
- $secret = 'a0322a2844bb46aca29983b8599e33e8';
- $signature = (hash_hmac('sha256', $ips, $secret, false));
- $header = join('|', array($ips, $signature));
- 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_HTTPHEADER, array('X-Insta-Forwarded-For:'.$header));
- 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?count=3&access_token=" . $token);
- $ngirim = json_decode($curl);
- foreach ($ngirim->data as $data) {
- $lampu = $data->username;
- $cahaya = curl("https://api.instagram.com/v1/media/" . $data->id . "/likes", array(
- "access_token" => $token
- ));
- $ngirim = json_decode($cahaya);
- if ($ngirim->meta->code == "200")
- echo "[WORK]";
- else
- echo "[FAIL]";
- sleep(2);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment