Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Finding out which country a user comes from using $_ENV[HTTP_...]by dws (Chancellor) |
on Oct 09, 2002 at 21:01 UTC ( [id://204049]=note: print w/replies, xml ) | Need Help?? |
By using one of the UNIX $_ENV[HTTP_...] vars, you can find out (more or less) which country a visitor comes from.
REMOTE_ADDR give you the client's IP address, but you still have a long way to go to map this to a country. You'll need to get your hands on IANA (Internet Assigned Number Authority) data, and data from the other organizations AINA has delegated to, parse it, and build an access method. People like Quova have build a business around this problem.
In Section
Seekers of Perl Wisdom
|
|