I have access to the GeoIP.dat file through my current host but every IP I enter is empty. Any idea what might be wrong or a way to troubleshoot it? I have php errors on but I don't see anything wrong.
Here is my current script:
<?php
include('geoip.inc');
include('geoipcity.inc');
include('geoipregionvars.php');
$gi = geoip_open("GeoIP.dat", GEOIP_STANDARD);
$rsGeoData = geoip_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);
echo("<pre>");
print_r($rsGeoData);
echo("</pre>");
geoip_close($gi);
?>
The result always looks like this:
geoiprecord Object
(
[country_code] =>
[country_code3] =>
[country_name] =>
[region] =>
[city] =>
[postal_code] =>
[latitude] => -180
[longitude] => -180
[area_code] =>
[dma_code] =>
[metro_code] =>
[continent_code] => --
)