levani
05-06-2009, 07:53 PM
How can I get information whether an user uses internet explorer 8 or not? I use this code for IE 6, but it doesn't seem to work on IE 8.
<?php
//if the browser is Microsoft IE
if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
if (ereg('MSIE 6',$_SERVER['HTTP_USER_AGENT']))
include (TEMPLATEPATH . '/form_ie.php');
} else {
include (TEMPLATEPATH . '/form_other.php');
}
?>
What I want to do is to execute different code if user comes from IE6 or older and different for all other browsers (including IE 7 and 8).
Any ideas?
<?php
//if the browser is Microsoft IE
if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
if (ereg('MSIE 6',$_SERVER['HTTP_USER_AGENT']))
include (TEMPLATEPATH . '/form_ie.php');
} else {
include (TEMPLATEPATH . '/form_other.php');
}
?>
What I want to do is to execute different code if user comes from IE6 or older and different for all other browsers (including IE 7 and 8).
Any ideas?