Re: Correlation between visitor's physical location and IP address
| From: | Police Trainee | Date: | Fri, 15 Dec 2000 08:09:56 +0000 |
| Subject: | Re: Correlation between visitor's physical location and IP address | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30472@lists.php.net to get a copy of this message | ||
you must keep in mind that there is no practical way
in which to assure that all your visitors see the
appropriate information. due to the very nature of the
internet, if content is based soley on the user's ip,
there will be *many* instances in which user's will
see the unintende information. You should opt to
include a user-selected option so the user can choose
the appropriate information (perhaps prompt for the
location at the very beginning, then set a cookie
indicating the country, then display the appropriate
information. The cookie (along with some additional
programming) will ensure that the user does not simply
go back and select another country to get those
rates...)
with regards to ip's, my suggestion is to do a reverse
ip lookup (resolve the ip into a domain name). If the
resolved name is indicative of a specific country, you
can go from there. But keep in mind some ip's will not
resolve into domain names. Perhaps you should then do
a whois query to determine if the isp is based in a
particular country.
sounds like a lot of work to me, yet feasable. But
don't ask me how to do it, i have no clue whatsoever.
lol
hope it gives you a starting point.
-mark
--- Stefen Lars <stefenlars@hotmail.com> wrote:
> 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.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
*****************************************************
* WebHosting from $15/mo! (25mb) *
* CGI,PHP,SSL,MySQL,SSI,Perl,C/C++,PGP,PGP mail, *
* shopping cart,stats,counter,mailing list manager, *
* online web-based control panel,ftp,anon ftp,more! *
* NO SETUP FEES! NO TRANSFER FEES! *
* Visit www.policetrainee.com for more information! *
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/