browser details

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy zo

    #1

    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.


  • Gordon Burditt

    #2
    Re: browser details

    >hello.[color=blue]
    >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.[/color]

    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_AGEN T'].
    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_LA NGUAGE'] contains the contents of the
    Accept-Language header, if any.

    Gordon L. Burditt

    Comment

    Working...