Newer
Older
Digital_Repository / Repositories / Misc / geoip_test.php
nstanger on 17 Jan 2007 296 bytes - Added a small test script for GeoIP.
<?php
include("geoip.inc");

// change the first argument to the correct location of the GeoIP.dat file.
$gi = geoip_open("/sw/share/GeoIP/GeoIP.dat",GEOIP_STANDARD);

print geoip_country_code_by_addr($gi, "139.80.64.99") . "\n";
print geoip_country_name_by_addr($gi, "139.80.64.99") . "\n";

?>