Title: php browser checking?
Last modified: August 18, 2016

---

# php browser checking?

 *  [dss](https://wordpress.org/support/users/dss/)
 * (@dss)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/)
 * is there a way to check and see which browser a viewer is using and send them
   away if they happen to be using IE?
    there are a lot of javascripts out there
   which seem to work fine in flash and ordinary html, but for some reason i’m not
   having any luck getting any of them working in a php/css environment. i’d like
   to see the whole world abandon IE, even my grandmother (who types “fernando” 
   into the to: section of her email application and doesn’t understand why i didn’t
   get her letter.) long live kubrick! death to IE and its mutant relations!

Viewing 14 replies - 16 through 29 (of 29 total)

[←](https://wordpress.org/support/topic/php-browser-checking/?output_format=md) 
[1](https://wordpress.org/support/topic/php-browser-checking/?output_format=md) 
2

 *  Anonymous
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80946)
 * dss, what do you mean by ‘specialize’? Alter it so it will display a message 
   to both IE and Netscape users?
    If that’s what you want to do it should be pretty
   easy.
 *  Thread Starter [dss](https://wordpress.org/support/users/dss/)
 * (@dss)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80951)
 * Brutal Sponge,
    i meant to speak only to IE 5.x and lower as well as netscape
   4.x and lower browsers. i see where the code is seeking “MSIE” but i wouldn’t
   know how to ask for MSIE5 and lower, or N4 and lower… um…
 *  Anonymous
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80952)
 * You think people not browsing on their own computer, and therefore not in a position
   to download Firefox, have no right to see your ‘wonderful designs’. How is that
   not exclusionary?
    If your designs were so wonderful perhaps you would take the
   trouble to make them work in every browser rather than imposing your personal
   preference on others. I suspect a lot of this anti-IE stuff is based on people
   being too lazy to learn the relevant CSS hacks.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80954)
 * If there is a finger of blame to be pointed, then it must surely be pointed at
   those that caused the issue in the first place – Microsoft.
 *  [optimystic](https://wordpress.org/support/users/optimystic/)
 * (@optimystic)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80963)
 * Not really an addition to the debate going on over here, but I thought I’d post
   this…
    When I visit the website of one of UK’s top energy companies, I am presented
   with a screen telling me that their site supports IE (5.0 and up), Netscape (
   7.02 and up), Opera (7.20 and up) and Konqueror (3.1.1 and up). Then it goes 
   to inform me that I am using Netscape 0.9.3 and denies me entry to the site. 
   I am, of course, using FireFox 0.9.3 😐
 *  [usafdcc](https://wordpress.org/support/users/usafdcc/)
 * (@usafdcc)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80968)
 * Let me try to close this can of worms. You and I mean you will do one of three
   things: lead, follow, or get out of the way. Ultimately you will do what you 
   want to do, and thatâ€™s fine because your view points do not affect my life 
   in any way. If you want to create a site that is accessible by all, fine, I will
   be able to go there. If you want to create a site that will exclude me, fine.
   I am sure that 1 minute on Google will direct me to a site that is better than
   yours. It is known that Microsoft will code their products to make them completely
   compatible with other Microsoft products. Isnâ€™t it ironic that some users would
   want to use that same tactic with their websites? This is a subject that is very
   touchy and will never be resolved. Hopefully in the future you will realize that
   IE will never go away as long as Bill Gates has more money than you. Just so 
   you know, I use IE, not because it is better, but because I have used it for 
   so long it is just what I am used to. Also, I installed FF so I can make sure
   that my site will be compatible with it.
 *  Anonymous
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80974)
 * > If you want to create a site that is accessible by all, fine, I will be able
   > to go there. If you want to create a site that will exclude me, fine. I am 
   > sure that 1 minute on Google will direct me to a site that is better than yours.
 * One minute? That long?!
    All this talk of ‘exclusion’ is a total non-issue. It’s
   not like any of these blogs are important or influential enough for it to matter.
   Blogs are ten-a-penny, nobody is going to sweat it or run away to download Firefox
   if they can’t see yours. Get over yourselves.
 *  [gravity](https://wordpress.org/support/users/gravity/)
 * (@gravity)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80977)
 * This is why there are wars.. :/ Too many opinions.
    The option to use FF exists
   and if you want to see the web as it was intended to be seen without all the 
   security issues of IE.. well a lot less. You would be a fool not to install it.
   However, for those of you whom use something cause you are used to it, and for
   some reason close the door on security… well suffer. The first priority of even
   being here should be security. Yes, I could go text on ya.. but… for the most
   part FF does it well. Personally I do not like having 40 spyware programs on 
   my machine each time I surf the web. That is what IE will get you. I do not have
   this problem with FF, either should you. Think about it.. it’s a no brainer.
 *  Anonymous
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80978)
 * There have already been two posts mentioning the plight of people who DO NOT 
   HAVE CONTROL OVER WHICH BROWSER THEY USE thanks to ignorant sysadmins and the
   like.
    sorry for shouting but it wasn’t getting through any other way.
 *  [usafdcc](https://wordpress.org/support/users/usafdcc/)
 * (@usafdcc)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80980)
 * Anyone else want to put in their 2 cents. I think this is a dead issue.
 *  Thread Starter [dss](https://wordpress.org/support/users/dss/)
 * (@dss)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80986)
 * you are good at writing your thoughts. i appreciate a great argument, and empassioned
   discussion. it’s fun to spar, and a coffee with you would be welcome anytime.
   
   it is my belief, however, that in a discussion, especially those with strong 
   opinions, have to “listen” as carefully as they pose their opinion (if you want
   to be successully persuasive.) again: i don’t think anyone disagrees with you.
   maybe we should have decaf.
 *  [usafdcc](https://wordpress.org/support/users/usafdcc/)
 * (@usafdcc)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80992)
 * **DSS:** If your comments are toward me, thank you. I apologize for being overly
   passionate. I believe in this case, empathy took second place.
 *  Anonymous
 * [21 years, 8 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-80997)
 * Try here: [http://js-x.com/javascript/?id=18](http://js-x.com/javascript/?id=18)
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-81030)
 * Sorry about ‘bumping’ an old thread, but I’ve done as was requested (had it done
   a few days ago, but just never got time to post it!). It’s all pretty simple,
   anyone who is running WP should be able to understand this pretty easily.
    `<?
   php $browser = $_SERVER['HTTP_USER_AGENT']; if(preg_match("/MSIE 5/i",$browser))//
   browser is IE 5 { echo 'It looks like you\'re using Internet Explorer 5.'; echo'
   Switch to Firefox!'; } elseif(preg_match("/Netscape 4/i",$browser))//browser 
   is Netscape 4 { echo 'It looks like you\'re using Netscape 4.'; echo 'Switch 
   to Firefox!'; } ?> The IE5 detection works, but I’m not entirely sure if it detects
   NS4, as I don’t have it. I’d appreciate it if someone could test it for me, though.

Viewing 14 replies - 16 through 29 (of 29 total)

[←](https://wordpress.org/support/topic/php-browser-checking/?output_format=md) 
[1](https://wordpress.org/support/topic/php-browser-checking/?output_format=md) 
2

The topic ‘php browser checking?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 29 replies
 * 7 participants
 * Last reply from: Anonymous
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/php-browser-checking/page/2/#post-81030)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
