How To Trace IP address With Php

Trace IP address With Php

Hello friends  is post me apko btaya jayega ki kis parkar ham kisi be ip address ko trace kar sakte hai.or aap apni website me ip address tracker tool integrate kar sakte ho



Step1-create a index.php file




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

Previous
Next Post »

1 comments:

Click here for comments
Unknown
admin
4 July 2018 at 00:52 ×

hide email idp$email='hardikdayani@gmail.com';echo$email=preg_replace('/(?:^|@).\K|\.[^@]*$(*SKIP)(*F)|.(?=.*?\.)/','*',$email);

Congrats bro Unknown you got PERTAMAX...! hehehehe...
Reply
avatar
Thanks for your comment