Skip to content

Instantly share code, notes, and snippets.

@ferdhika31
Created March 14, 2015 11:53
Show Gist options
  • Save ferdhika31/ca02453e69608e3aa4b2 to your computer and use it in GitHub Desktop.
Save ferdhika31/ca02453e69608e3aa4b2 to your computer and use it in GitHub Desktop.
Bot Komen Beranda Instagram
<?php
/*
********************************************************
****| SIMPLE BOT KOMEN INSTAGRAM |****
********************************************************
*/
$toket = "token elo lah bro...";
$komeng = "hayyy @" . $nami . ", like back eaa kaka :D";
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=" . $toket);
$ngirim = json_decode($curl);
foreach ($ngirim->data as $data) {
$nami = $data->username;
$menta = curl("https://api.instagram.com/v1/media/" . $data->id . "/comments", array(
"access_token" => $token,
"text" => urlencode($komeng)
));
$ngirim = json_decode($menta);
if ($ngirim->meta->code == "200")
echo "Berhasil cooyy!!\n";
else
echo "Gagal komeng :((\n";
sleep(2);
}
?>
@sari158
Copy link

sari158 commented Apr 8, 2023

Saya sudah follow kak

@leejensimp
Copy link

Tes

@dimasaagpr
Copy link

okey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment