$useragent = $_SERVER['HTTP_USER_AGENT']; if ( strstr($useragent, "MSIE" ) || strstr($useragent, "Internet Explorer" ) ) { // do something }