SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Detect Browser

  1. #1
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detect Browser

    Ok, this seems real noob but I'm kinda rusty with PHP. So basically I want something that:

    Detects if someone has Internet Explorer... if they do than display a image. Example:

    If Browser= Internet Explorer than
    display http://google.com/image.jpg
    Else
    Do Nothing

    Thanks in advance,

    Mike
    How does that make your feel?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code PHP:
    if (eregi("MSIE", $_SERVER['HTTP_USER_AGENT'])) {
      echo "<img src='http://www.google.com/image.jpg' />";
    }

  3. #3
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much dan
    How does that make your feel?


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
  •