Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $data = @file_get_contents("https://www.instagram.com/".$_GET['username']."/?__a=1");
- if($data[0] == "{"){
- $json_data = json_decode($data);
- $user_id = $json_data->user->id;
- $following_count = $json_data->user->follows->count;
- $followers_count = $json_data->user->followed_by->count;
- $bio = $json_data->user->biography == "" ? "empty" : $json_data->user->biography;
- $is_private = $json_data->user->is_private == true ? 1 : 0;
- $media_count = $json_data->user->media->count;
- echo $data;
- }else{
- echo '{"user": {"username": "notfound", "follows": {"count": 0}, "followed_by": {"count": 0}, "profile_pic_url": "https://instagram.fsvg1-1.fna.fbcdn.net/t51.2885-19/11906329_960233084022564_1448528159_a.jpg", "is_private": true, "full_name": null, "media": {"count": 0}}}';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement