SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast bokz_42's Avatar
    Join Date
    Sep 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    another browser detect problem

    hey guys,

    here's the situation.

    I have a list of user agents saved in my database. How determine if this user agent is FF or IE?

    Example

    i have this saved on my database
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.3; .NET CLR 1.1.4322)

    How can i determine that this user agent is IE8


    Thanks and more power!~

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I don't know...but I think "MSIE 8.0" is a dead give away...no?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    You could try phpSniff: http://phpsniff.sourceforge.net/

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    How about you don't detect and redirect and make your site work for everyone equally.

    What you're doing is as insulting to the end user as those JavaScript resolution redirect scripts.

  5. #5
    SitePoint Enthusiast bokz_42's Avatar
    Join Date
    Sep 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    How about you don't detect and redirect and make your site work for everyone equally.

    What you're doing is as insulting to the end user as those JavaScript resolution redirect scripts.
    ok my bad, but i think you got it wrong.

    what i wanna do is to count all occurrences of IE,FF,OPERA,SAFARI,CHROME etc in my database. All i got save in there is their full user agent string.

    but anyway peaceout! thanks and more power!~


Tags for this Thread

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
  •