On 18/11/11 10:16, Brett Parker wrote:
Add a GeoIP lookup to the ContactUs page, and if it's not from where you want display a different output - e.g. "Sorry, you're not allowed to visit this site", or change the response to a redirect to a different contact page.
I'd second Brett's suggestion. There are GeoIP libraries for PHP, and for Ubuntu at least all it takes is "sudo apt-get install php5-geoip" to get them installed. Then: geoip_country_code_by_name("<ip.addr.here>") .. will get you the country code.
Actually for your purposes, just a continent code lookup may suffice: http://www.php.net/manual/en/function.geoip-continent-code-by-name.php