Hi, I remember I used a service once I can't remember it's URL now, I was sending an IP as a query, and that site was sending country, city, etc. as a response to me back as a string. Do you remember it? Thanks.
<?php function ip2c($lookup_ip) { $ip = $lookup_ip; $country = file_get_contents("http://api.hostip.info/get_html.php?ip=".$ip."&position=true",false); preg_match("/country: (.*?)\ncity: (.*?)\nlatitude: (.*?)\nlongitude: (.*?)$/i",$country,$result); return $result; } $data = ip2c("24.26.73.230"); echo "Country: ".$data[1]."<br />"; echo "City / State: ".$data[2]."<br />"; echo "Latitude: ".$data[3]."<br />"; echo "Longitude: ".$data[4]."<br />"; ?> PHP: