Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Coded by Streamah
- https://hackforums.net/member.php?action=profile&uid=3105131
- Released on 11/19/2016
- ---
- Username Functions (api.php?command=bio&username=echo123),
- [+] bio
- [+] name
- [+] profile_picture
- Picture Functions (api.php?command=current_likes&link=http://instagram.com/p/iu4g3D,
- [+] current_likes
- [+] media_id
- [+] thumbnail
- [+] userid
- [+] username
- ---
- If you need any help, PM me on HF.
- */
- //Settings
- error_reporting(0);
- $link = $_GET['link'];
- $command = $_GET['command'];
- $username = $_GET['username'];
- if ($command == null) {
- echo 'You must enter a command.';
- }
- //Grabs bio from username
- if ($command == "bio") {
- if ($username == null) {
- echo 'You must enter a username';
- } else {
- $content = file_get_contents('http://instagram.com/' . $username . '');
- $first_step = explode('<meta property="og:description" content="', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs name from username
- if ($command == "name") {
- if ($username == null) {
- echo 'You must enter a username';
- } else {
- $content = file_get_contents('http://instagram.com/' . $username . '');
- $first_step = explode('<meta property="og:title" content="', $content);
- $second_step = explode('(', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs profile picture from username
- if ($command == "profile_picture") {
- if ($username == null) {
- echo 'You must enter a username';
- } else {
- $content = file_get_contents('http://instagram.com/' . $username . '');
- $first_step = explode('<meta property="og:image" content="', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs the amount of likes from a picture
- if ($command == "current_likes") {
- if ($link == null) {
- echo 'You must enter the link';
- } else {
- $content = file_get_contents($link);
- $first_step = explode('<meta content="See this Instagram photo by ', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs the media_id from a picture
- if ($command == "media_id") {
- if ($link == null) {
- echo 'You must enter the link';
- } else {
- $content = file_get_contents($link);
- $first_step = explode('<meta property="al:ios:url" content="instagram://media?id=', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- echo '_';
- $first_step = explode('<meta property="instapp:owner_user_id" content="', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs the original thumbnail url from a picture
- if ($command == "thumbnail") {
- if ($link == null) {
- echo 'You must enter the link';
- } else {
- $content = file_get_contents($link);
- $first_step = explode('<meta property="og:image" content="', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs the userid of the user from a picture
- if ($command == "userid") {
- if ($link == null) {
- echo 'You must enter the link';
- } else {
- $content = file_get_contents($link);
- $first_step = explode('<meta property="instapp:owner_user_id" content="', $content);
- $second_step = explode('"', $first_step[1]);
- echo $second_step[0];
- }
- }
- //Grabs the username of the user from a picture
- if ($command == "username") {
- if ($link == null) {
- echo 'You must enter the link';
- } else {
- $content = file_get_contents($link);
- $first_step = explode('<meta content="See this Instagram photo by ', $content);
- $second_step = explode(' •', $first_step[1]);
- echo $second_step[0];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment