Is there a superglobal reference to the user's country or is using the IP against a database of IP to Country lookups the best way to go?
+2
A:
i wish there were such thing as $_SERVER['HTTP_COUNTRY']
... maybe in php99 ? ;)
for the time being, http://php.net/manual/en/book.geoip.php is your best bet
however, if you're only interested in user's language, there is $_SERVER["HTTP_ACCEPT_LANGUAGE"]
stereofrog
2009-11-15 00:12:27
Funnily enough, some providers include the MaxMind GeoIP module in PHP which provides country information in the $_SERVER variable: http://www.maxmind.com/app/php - very, very rare, though.
Pekka
2009-11-15 00:14:37
this is the same thing i linked to above
stereofrog
2009-11-15 00:18:10