Need help in PHP to retrive instagram user's details

itzaditya

Newbie
Joined
Sep 13, 2017
Messages
10
Reaction score
1
Hello BHW members. I have a instagram follower landing page in which i m facing a small issue. The issue is when I put a username in it, it says "profile is not retrived or invalid username".
If any php developer here please help me to fix that issue. PHP code is attached in txt format.
 

Attachments

Hello BHW members. I have a instagram follower landing page in which i m facing a small issue. The issue is when I put a username in it, it says "profile is not retrived or invalid username".
If any php developer here please help me to fix that issue. PHP code is attached in txt format.
There's your code bro

How to lunch:

Create PHP file test.php and paste code.
Than go to url:

https://yourdomain.com/test.php?username=ig_username_here

<?php
ini_set("display_errors", "On");

$username = $_GET['username'];
$url = "https://www.instagram.com/" . $username;
$data = quotemeta( file_get_contents($url));

preg_match('/content\=\"([0-9\.\,k-m\S]+)\ Followers\,/',$data,$followers);
preg_match('/([0-9]+)\ Following\,/',$data,$following);
preg_match('/\"full_name\"\:\"(.*)\"\,\"has_channel\"/',$data,$full_name);
preg_match('/\"profile_pic_url_hd\":\"(.*)"\,\"requested_by_viewer\"/',$data,$profile_pic);


echo "Full Name: ".$full_name[1]."<br />";
echo "Followers: ".str_replace('\\', "", $followers[1])."<br />";
echo "Following: ".$following[1]."<br />";
echo "Profile pic: ".str_replace('\\', "", $profile_pic[1])."<br />";


?>
 
How to lunch:
I prefer real food for lunch rather than PHP scripts :p j/k


@OP
The code you have is incomplete. The else part (line 38) has not ended and that is what causing the problem. Get the full script and post here. We will definitely help you with that :)
 
Back
Top