Correlation between visitor's physical location and IP address
| From: | Stefen Lars | Date: | Fri, 15 Dec 2000 07:53:59 +0000 |
| Subject: | Correlation between visitor's physical location and IP address | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30468@lists.php.net to get a copy of this message | ||
Hello all
I am currently working on a project where prices in 2 currencies must be displayed on a web site. Web visitors from Europe should be shown the price in Euro and those outside Europe should be shown the price in US Dollars.
Due to a whole list of 'political' problems, the European customers should not be able to see the USD prices and the non-EU customers should not be able to see the USD prices. I know that sucks, but that is the way it is. I cannot change it, unfortunately.
All price data is stored in a mySQL database and PHP4 is to be used to get this data into the HTML. ;-)
The question is:
How can one ascertain the physical location of a web visitors' computer when he/she comes to the web site?
Is there a correlation between IP addresses and countries? If there is, where can one find a table illustrating this information?
Has anyone attempted something like this?
Two examples come to mind where a similar solution is in operation:
1. www.altavista.com : when I go to www.altavista.com I sometimes get a pop up window in German telling me that there also exists Altavista in German. The message is in German. Some how Altavista knows that I am in Germany.
2. www.imdb.com : when I look at the details of any movie, I see a link to amazon.de to buy that movie. I can hardly think that anyone outside Germany would get that link.
Somehow these two sites 'know' where I am physically located. Now, how do they do that?
If anyone can help me, I would LOVE to here from you!
/S
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.