Parse instagram account and get all photos
<?
$ig = json_decode(file_get_contents("https://www.instagram.com/kevin/media/"));
while($ig->more_available) {
foreach($ig->items as $item) {
echo $item->id."<br>";
echo "<img src=".$item->images->standard_resolution->url."><br>";
echo $item->caption->text."<br>";
}
$ig = json_decode(file_get_contents("https://www.instagram.com/kevin/media/?max_id=".$item->id));
}
?>
Get photos details by hashtag (filter auditory)
<?
$ig = json_decode(file_get_contents("https://www.instagram.com/explore/tags/friday/?__a=1"));
while($ig->tag->media->page_info->has_next_page) {
foreach($ig->tag->media->nodes as $item) {
echo $item->id." ".$item->owner->id."\n";
}
$ig = json_decode(file_get_contents("https://www.instagram.com/explore/tags/friday/?__a=1&max_id=".$ig->tag->media->page_info->end_cursor));
}
?>