browser details

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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.


Re: browser details

Quoted text here. Click to load it

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,
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

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

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

                            Gordon L. Burditt

Site Timeline