Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. function getProfilePic($username)
  4. {
  5.     $data = file_get_contents('https://www.instagram.com/' . $username);
  6.     $data = explode('window._sharedData = ', $data);
  7.     $data = explode(';</script>', $data[1]);
  8.     $data = json_decode($data[0], true);
  9.     return $data['entry_data']['ProfilePage'][0]['user']['profile_pic_url_hd'];
  10. }
  11.  
  12. echo getProfilePic('user');
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement