Re: How to find out what country the visitor comes from
| From: | Jon Farmer | Date: | Fri, 08 Feb 2002 12:56:52 +0000 |
| Subject: | Re: How to find out what country the visitor comes from | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83992@lists.php.net to get a copy of this message | ||
One you have the IP you need to do a whois on the RIPE database to work out
who the IP is assigned to and which country they are in.
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969
PGP Key available, send email with subject: Send PGP Key
----- Original Message -----
From: "SED" <sed@sed.is>
To: <php-general@lists.php.net>
Sent: Thursday, February 07, 2002 12:11 PM
Subject: [PHP] How to find out what country the visitor comes from
> Hi,
>
> I'm trying to find out what country the visitor comes from to offer them
> suitable language (like google.com does) but I haven't found a method
> that works 100%. What I have come up with so far is to use
>
> $HTTP_X_FORWARDED_FOR
>
> or
>
> gethostbyaddr($REMOTE_ADDR)
>
> Sometime I get domain which does the job (and that works) but often I
> get just IP number which leaves me out in the cold. Is there any other
> way to capture the visitors country?
>
> Thanks,
> SED
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>