Get Country City from IP address in PHP
Here is a simple php script that lets you track the location of the visitor’s on your site using his IP address.
Code:
<?
$ip = $_SERVER['REMOTE_ADDR'];
$url = "http://www.ipmango.com/api.php?ip=".$ip;
$xml = simplexml_load_file($url);
echo "IP address : {$xml->ipaddress}";
echo "City : {$xml->city}";
echo "Region : {$xml->region}";
echo "Country Name : {$xml->countryname}";
echo "Latitude : {$xml->latitude}";
echo "Longitude : {$xml->longitude}";
?>
<span id="more-57"></span>
The above code uses the ipmango.com geo ip which outputs the details in xml format.
Popularity: 40% [?]
















Getting an Ip-Address of an city using the website It is possible in many websites.I have recently used the site http://www.ip-details.com.All the informations very fast,free of cost also..