Guest User

Untitled

a guest
Apr 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <?php
  2. function getPublicInfo($username) {
  3. $url = sprintf("https://www.instagram.com/$username");
  4. $content = file_get_contents($url);
  5. $content = explode("window._sharedData = ", $content)[1];
  6. $content = explode(";</script>", $content)[0];
  7. $data = json_decode($content, true);
  8. return $data['entry_data']['ProfilePage'][0];
  9. }
Add Comment
Please, Sign In to add comment