![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
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'; } No members have liked this post.
Last edited by gamerfu : 17 Feb 2010 at 17:22. |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 05:52.


