The way Google determines what language to use is by checking the
Accept-Language header which is added by your browser.
The value of this request header is stored automatically in the $_SERVER
array. Check with phpinfo() or print_r($_SERVER);
Although IP may be more reliable to determine the
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
Hi:
SED wrote:
>
> I'm trying to find out what country the visitor comes from to offer them
> suitable language
> $HTTP_X_FORWARDED_FOR
> or
> gethostbyaddr($REMOTE_ADDR)
Domain names and IP's are NOT the way to go. Way to unreliable. Use the
HTTP header HTTP_ACCEPT_
3 matches
Mail list logo