Skip to content

Instantly share code, notes, and snippets.

View aa21's full-sized avatar

Alex Arul aa21

  • Hatcher, Blk 71
  • singapore
View GitHub Profile
@aa21
aa21 / instagram_scrape.php
Created June 17, 2016 07:20 — forked from cosmocatalano/instagram_scrape.php
Quick-and-dirty Instagram web scrape, just in case you don't think you should have to make your users log in to deliver them public photos.
<?php
//returns a big old hunk of JSON from a non-private IG account page.
function scrape_insta($username) {
$insta_source = file_get_contents('http://instagram.com/'.$username);
$shards = explode('window._sharedData = ', $insta_source);
$insta_json = explode(';</script>', $shards[1]);
$insta_array = json_decode($insta_json[0], TRUE);
return $insta_array;
}
@aa21
aa21 / instagram-fetcher.php
Created June 17, 2016 07:19 — forked from shahril96/instagram-fetcher.php
Simple Instagram media info fetcher
<?php
/*
* title : simple instagram info fetcher
*
* author : shahril
* receipant : afif zafri
* date : 29-dis-2015
*/