I’d actually hacked Locations to use the Maxmind database awhile back. It is much better than the previous version. I’d planned on releasing it to the world, but then forgot. Whoops! Sorry.
In any case, I just wrote a quick PHP file to simulate hostip.info. Here it is. You need to have some of the PHP files from Maxmind’s site and the database installed, then just change the URL in Locations.
header(“Content-type: text/plain”);
include(“geoipcity.inc”);
include(“geoipregionvars.php”);
$gi = geoip_open(“GeoLiteCity.dat”,GEOIP_MEMORY_CACHE);
$record = geoip_record_by_addr($gi,$_POST[‘ip’]);
$country = $record->country_name . ” (” . $record->country_code . “)”;
if ($record->country_code == ”)
$country = ‘(Unknown Country?) (XX)’;
$city = $record->city . “, ” . $GEOIP_REGION_NAME[$record->country_code][$record->region];
if ($record->city == ”)
$city = ‘(Unknown City?)’;
print “Country: ” . $country . “\n”;
print “City: ” . $city . “\n”;
print “Latitude: ” . $record->latitude . “\n”;
print “Longitude: ” . $record->longitude;
geoip_close($gi);