PHP: getenv("HTTP_USER_AGENT") weirdness.

Discussion in 'Web Design & Coding' started by Glaanieboy, Nov 28, 2003.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I am trying to create a sig like on Danasoft. One of the things the script should show, is which browser the one that is watching the sig is using. I am playing around a bit, and I found out that my IE6 has this HTTP_USER_AGENT signature:
    Code:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
    
    Why Mozilla? Is IE using pieces of Mozilla code? Or is IE in fact Mozilla?
     
  2. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    It has always identified itself as that, one of the more reasons some stats scripts think that the older mozilla's are in fact IE's.

    Nothing weird about that. Normal to see that.
     
  3. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    To identify a browser as IE, just look for the MSIE string within the user agent string. The initial "Mozilla" string is used by all browsers.
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.6

    I thought all browsers had the Mozilla/x.x ?
     
  5. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Not all as far as i know, but yes most do.
     
  6. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
  7. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    nice site Speedy.
     
  8. Maveric169

    Maveric169 The Voices Talk to Me

    Messages:
    1,148
    Location:
    Elkhart, IN
    Google search for Unsupported Browser

    ROTFLMAO

    Unsupported Browser
    We are very sorry, but our web site will not work with your browser. ... isn't feasible
    to make this site do what MOST users need and work with ALL web browsers. ...
    Description: Mayor, City Council, boards and commissions, and other information from city government.
    Category: Regional > North America > ... > K > Knoxville > Government
    www.ci.knoxville.tn.us/ - 3k - Nov 28, 2003 - Cached - Similar pages
     
  9. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Its really sad, but sucks for those sites, less hits for them.