Time: 2026-07-05 17:36:56
<?php
$result = null;
if(isset($_POST['url'])){
$url = trim($_POST['url']);
if(preg_match('#instagram\.com/([A-Za-z0-9._]+)#', $url, $m)){
$username = $m[1];
}else{
$username = trim($_POST['url']);
}
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://instagram120.p.rapidapi.com/api/instagram/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"username" => $username
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rapidapi-host: instagram120.p.rapidapi.com",
"x-rapidapi-key: YOUR_NEW_RAPIDAPI_KEY"
],
]);
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response, true);
if(isset($json['result'])){
$result = $json['result'];
}else{
echo "Profile not found or API error.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Instagram Live Profile</title>
<meta http-equiv="refresh" content="30">
<style>
body{
background:#111;
color:#fff;
font-family:Arial;
text-align:center;
}
.box{
width:380px;
margin:auto;
margin-top:30px;
background:#222;
padding:20px;
border-radius:12px;
}
input{
width:95%;
padding:12px;
font-size:16px;
}
button{
padding:12px 25px;
margin-top:10px;
background:#E1306C;
color:#fff;
border:none;
cursor:pointer;
}
img{
width:150px;
height:150px;
border-radius:50%;
margin-top:15px;
}
.info{
font-size:20px;
margin-top:10px;
}
</style>
</head>
<body>
<div class="box">
<h2>Instagram Profile Checker</h2>
<form method="post">
<input type="text" name="url" placeholder="Instagram URL ya Username">
<br>
<button>Search</button>
</form>
<?php if($result){ ?>
<img src="<?= $result['profile_pic_url_hd']; ?>">
<h2><?= htmlspecialchars($result['full_name']); ?></h2>
<p>@<?= htmlspecialchars($result['username']); ?></p>
<div class="info">
Followers:
<?= number_format($result['edge_followed_by']['count']); ?>
</div>
<?php } ?>
</div>
</body>
</html>
Delete