RE: Browser detection code
| From: | Dusty Cohen | Date: | Sat, 25 Nov 2000 13:34:49 +0000 |
| Subject: | RE: Browser detection code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27143@lists.php.net to get a copy of this message | ||
if ( preg_match("/MSIE/",$HTTP_USER_AGENT) ) {
// PROPER HTML
} else {
// STUFF TO HACK NAVIGATOR
}
Just checking for IE is generally enough. Netscape doesn't send any useful info to identify
itself. OK, so the guy in Alaska with Opera will get the Navigator fix, but that's better than
all the Navigator guys getting the Explorer stuff.
Dusty
-----------------------------------------------
http://TerribleHost.com 50mg/php/mySQL $10month
-----------------------------------------------
> Can anyone send sample code for browser version and name detection?
>
> Paco
>