Welcome to WebmasterWorld Guest from 3.80.60.248
function geolocation()
{
include_once('./geoip.inc');
$gi = geoip_open('./GeoIP.dat', GEOIP_STANDARD);
$countrycode = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);
return in_array($countrycode, array('US', 'GB', 'FR', 'CA', 'AU', 'NZ'));
}
Returns true if user is from supported country.
You'll need:
[maxmind.com...]
[maxmind.com...]