Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
- if (count($matches)>1){
- //Then we're using IE
- $version = $matches[1];
- switch(true){
- case ($version<=8):
- //IE 8 or under!
- break;
- case ($version==9):
- //IE9!
- break;
- default:
- //You get the idea
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement