Is parkar aap easily kisi be user ka ip address track kar sakte ho
<fieldset>
<form action="" method="POST">
<input type="text" name="ip"/>
<br>
<input type="submit" name="submit">
</form></fieldset>
<?php
if(isset($_POST['submit'])){
$ip = $_POST['ip']; // the IP address to query
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query && $query['status'] == 'success') {
echo 'Hello visitor from '.$query['country'].', '.$query['region'].'!';
echo "<br>";
echo $query['city'];
echo "<br>";
echo $query['zip'];
echo "<br>";
echo $query['timezone'];
echo "<br>";
echo $query['isp'];
echo "<br>";
echo $query['query'];
echo "<br>";
echo $query['lat'];
echo "<br>";
echo $query['lon'];
} else {
echo 'Unable to get location';
}
}
?>
Demo-
TRACE IP ADDRESS
App apne tool me niche dig ye sare information ko trace kar sakte ho
//13:"San Francisco";s:3:"zip";s:5:"94105";s:3:"lat";s:7:"37.7898";s:3:"lon";s:9:"-
122.3942";s:8:"timezone";s:19:"America/Los_Angeles";s:3:"isp";s:20:"Wikimedia
Foundation";s:3:"org";s:20:"Wikimedia Foundation";s:2:"as";s:28:"AS14907 Wikimedia
US network";s:5:"query";s:14:"208.80.152.201";}
//app yanha extra fields be trace kar sakte ho
example apko yellow color echo $query['lon']; is trah se code ko paste karna hai jo be field aap trace karna chahte ho
Agar apko koi problem a rhe hai to aap comment me puch sakte ho.
Thank you
Team gajabwap web in hindi
Also Read-
How to Get Weather Detail with Php
1 comments:
Click here for commentshide email idp$email='hardikdayani@gmail.com';echo$email=preg_replace('/(?:^|@).\K|\.[^@]*$(*SKIP)(*F)|.(?=.*?\.)/','*',$email);
ConversionConversion EmoticonEmoticon