Entry
how can we get the country name from which a client requests a web page
Sep 29th, 2006 03:40
Crick Dougles, Denny De La Haye, devunoori kishan,
You could try doing a lookup on the REMOTE_ADDR part of the environment
variables from the HTTP transaction and then parsing it for TLD, but
this isn't particularly foolproof. For instance, parsing my home IP
address would probably get you .btinternet.com which would either make
you think I'm in America (if you're an American and are under the
mistaken impression that .com belongs to the USA) or make you think I'm
international in scope, which is obviously silly. If I were to browse
from work however, you should be able to track me back to a .ac.uk
domain, which would let you know which country I was in.
http://www.jaipurweddingcards.com