468,249 Members | 1,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

browser details

hello.
i would like to know how to get the browser details of my surfers (like: ip,
langauge, version, OS, etc').

if you have a link to some information or manual it will be great.

thanks,
Roe.
Jul 17 '05 #1
1 4151
>hello.
i would like to know how to get the browser details of my surfers (like: ip,
langauge, version, OS, etc').

if you have a link to some information or manual it will be great.


The IP address of the browser OR the nearest proxy is in
$_SERVER['REMOTE_ADDR'] (at least on Apache servers, with PHP as a
module or CGI). If a proxy is in use, you really have no way to
determine the user's real IP (and if the real IP is 192.168.0.1,
how many of those are there scattered all over the world?). The
proxies might add headers that give you a hint, or they might lie.
Browsers might also pretend that they are a proxy and lie. Beware
that some round-robin proxies may make requests for pieces of the
same page, and consecutive pages, come from different public IP
addresses.

A string containing browser info is in $_SERVER['HTTP_USER_AGENT'].
Also consider feeding that to the get_browser() function. You
should be able to parse out browser name, version, OS, etc. but
beware that many of the "minority" browsers pretend to be Internet
Explorer or Mozilla to make websites behave or not reject them
outright.

$_SERVER['HTTP_ACCEPT_LANGUAGE'] contains the contents of the
Accept-Language header, if any.

Gordon L. Burditt
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by www | last post: by
4 posts views Thread by Paul W | last post: by
reply views Thread by le0 | last post: by
dmjpro
13 posts views Thread by dmjpro | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.