bebeboutik/modules/fraud/vendor/localisation/sample.php

21 lines
530 B
PHP
Raw Normal View History

2016-01-04 12:49:26 +01:00
#!/usr/bin/php -q
<?php
// This code demonstrates how to lookup the country by IP Address
include("geoip.inc");
// Uncomment if querying against GeoIP/Lite City.
// include("geoipcity.inc");
$gi = geoip_open("/usr/local/share/GeoIP/GeoIP.dat",GEOIP_STANDARD);
echo geoip_country_code_by_addr($gi, "24.24.24.24") . "\t" .
geoip_country_name_by_addr($gi, "24.24.24.24") . "\n";
echo geoip_country_code_by_addr($gi, "80.24.24.24") . "\t" .
geoip_country_name_by_addr($gi, "80.24.24.24") . "\n";
geoip_close($gi);
?>