![]() |
PHP check for IE
How do I check for IE 6 and older browsers in PHP?
The function I want to run is anything older than IE6 should run other images, if anything newer or any other browser display PNGs: $useragent = $_SERVER[‘HTTP_USER_AGENT’]); if (preg_match(‘|MSIE ([0-6].[0-9]{1,2})|’,$useragent,$matched)) { $browser_version=$matched[1]; $browser = ‘IE’; $extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg'; } else { $extList['png'] = 'image/png'; } |
All times are GMT. The time now is 03:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|