-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
100 lines (88 loc) · 3.27 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Get Instagram profile picture at full size and other user info">
<title>INSTA PWNED</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.propic {
border: 1px solid #ddd;
border-radius: 3px;
padding: 3px;
max-width: 100%;
height: auto;
width: auto;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #f5f5f5;
}
</style>
</head>
<body>
<div class="container">
<?php
if(!isset($_POST['username']) || $_POST['username'] == "")
{
echo '<h1>INSTA PWNED</h1>
<form action="" method="POST">
<div class="input-group mb-3">
<input type="text" name="username" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
</div>
<input type="submit" value="SEARCH" class="btn btn-primary">
<br><br><small class="text-muted">INSTA PWNED is not affiliated with Instagram™</small>
</form></div>
';
die('<footer class="footer">
<div class="container">
<span class="text-muted">
<a href="https://github.com/Alexzava/instapwned"><img src="https://image.flaticon.com/icons/svg/25/25231.svg" width="30px"/> Source Code</a>
<span style="float: right">Made with <img src="https://image.flaticon.com/icons/svg/148/148836.svg" width="25px"/> by Alexzava.</span>
</span>
</div>
</footer>');
}
$html = file_get_contents('https://instagram.com/'.$_POST['username']);
//Get user ID
$subData = substr($html, strpos($html, 'window._sharedData'), strpos($html, '};'));
$userID = strstr($subData, '"id":"');
$userID = str_replace('"id":"', '', $userID);
$userID = strstr($userID, '"', true);
//Download user info
$jsonData = file_get_contents('https://i.instagram.com/api/v1/users/'.$userID.'/info/');
$decodedInfo = json_decode($jsonData);
$username = $decodedInfo->user->username;
$profilePic = $decodedInfo->user->hd_profile_pic_url_info->url;
$follower = $decodedInfo->user->follower_count;
$following = $decodedInfo->user->following_count;
$full_name = $decodedInfo->user->full_name;
$isPrivate = $decodedInfo->user->is_private;
$isVerified = $decodedInfo->user->is_verified;
$bio = $decodedInfo->user->biography;
//Print info
echo '<br><a href="index.php" class="btn btn-primary">BACK</a><br><br>';
echo '<b>Username:</b> '.$username.'<br>';
//echo 'User ID: '.$userID.'<br>';
echo '<b>Full Name:</b> '.$full_name.'<br>';
echo '<b>Profile Picture (HD):</b> <a href="'.$profilePic.'">OPEN</a><br>';
echo '<b>Biography:</b> '.$bio.'<br>';
echo '<b>Follower:</b> '.$follower.'<br>';
echo '<b>Following:</b> '.$following.'<br>';
if($isPrivate)
echo '<b>Private Profile:</b> TRUE<br>';
else
echo '<b>Private Profile:</b> FALSE<br>';
if($isVerified)
echo '<b>Verified:</b> TRUE<br>';
else
echo '<b>Verified:</b> FALSE<br><br>';
echo '<img class="propic" src="'.$profilePic.'"/><br><br>';
?>
</div>
</body>
</html>