SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Does anyone have a browser detection script whereby it can detect whether its IE or NS or 'ELSE' and its version?

    I'm trying to make do without javascript for special reasons.
    Thank You!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you simply need to access the $HTTP_USER_AGENT varable. Then parse it to determin which browser it is.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are the following options?
    Like..will it be IE or NS or netscape etc.?

    How about the browser version?
    Thanks
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  4. #4
    Anyone seen my cypher? OneChance's Avatar
    Join Date
    Apr 2001
    Location
    Seattle
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here are some resources you can look at:

    Site 1
    Site 2

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! That did it! hehe
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  6. #6
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, so I've got some PHP code to detect the IE browser or other:

    if (ereg("MSIE", $HTTP_USER_AGENT) or ereg("Mozilla/5",
    $HTTP_USER_AGENT))
    $browser="IE";
    } else {
    $browser="Other";
    }

    My question is - does anyone know if this is more/less accurate/reliable than similar client-side javascript browser detection routines? It's probably just the same.

    Just curious.
    Last edited by spaceman; Sep 6, 2001 at 19:26.
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •