Stupid thing to ask, http_user_agent Q

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    #1

    Stupid thing to ask, http_user_agent Q

    <?php
    $user = $_SERVER['HTTP_USER_AGENT'];
    $name = $_SERVER['SERVER_NAME'];
    $soft = $_SERVER['SERVER_SOFTWARE'];
    $meth = $_SERVER['REQUEST_METHOD'];
    $addr = $_SERVER['REMOTE_ADDR'];

    echo "HTTP_USER_AGENT: <b>$user</b> <br />";
    echo "Server Name: <b>$name</b> <br />";
    echo "Server Software: <b>$soft</b> <br />";
    echo "Request Method: <b>$meth</b> <br />";
    echo "Remote Addr: <b>$addr</b> <br />";
    ?>
    The code; now, is it just me or is this the right output for MSIE?
    HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
    Server Name: localhost
    Server Software: Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7c PHP/4.3.9
    Request Method: GET
    Remote Addr: 127.0.0.1
    Mozilla/4.0 ?? Thats what my question is, is the HTTP_USER_AGENT
    that I got correct? I didn't realize MSIE uses Mozilla if so
    "How can someone be so distracted yet so focused?"
    - C
  • djn
    Senior Member
    • Mar 2004
    • 140

    #2
    Yes, IE has been claiming to be 'Mozilla compatible' since, well, ages ago... It is not related to what is now the Moz browser, it originated when Netscape introduced the so-called Netscape Extensions to HTML (tables, frames and such). Back then Netscape user agent string was 'Mozilla ... something' and CGI scripts used that to serve what was then 'richer' content to Nescape. IE put the Mozilla string there to mean it too was capable of displaying tables and such.

    Comment

    • Jonathan
      Senior Member
      • Mar 2004
      • 1229

      #3
      Originally posted by djn
      Yes, IE has been claiming to be 'Mozilla compatible' since, well, ages ago... It is not related to what is now the Moz browser, it originated when Netscape introduced the so-called Netscape Extensions to HTML (tables, frames and such). Back then Netscape user agent string was 'Mozilla ... something' and CGI scripts used that to serve what was then 'richer' content to Nescape. IE put the Mozilla string there to mean it too was capable of displaying tables and such.
      Really? Cool! I didn't know that, explains why it says Mozilla though
      "How can someone be so distracted yet so focused?"
      - C

      Comment

      • Buddha
        Senior Member
        • Mar 2004
        • 825

        #4
        Big list of user agent strings: http://www.psychedelix.com/agents.html
        "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

        Comment

        • djn
          Senior Member
          • Mar 2004
          • 140

          #5
          And this one has more still:
          WURFL, by ScientiaMobile, is a DDR (Device Description Repository), a catalogue of mobile device information and a framework for adaptation of mobile applications

          (but they're PDAs and WAP phones)

          Comment

          Working...