// Figure out which browser the user is using $user_agent = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/Firefox.2/i', $user_agent)){ $browser = "ff ff2"; } else if (preg_match('/Firefox.3/i', $user_agent)) { if (preg_match('/Firefox.3.5/i', $user_agent)) $browser = "ff ff35"; else if (preg_match('/Firefox.3.0/i', $user_agent)) $browser = "ff ff30"; else if (preg_match('/Firefox.3.6/i', $user_agent)) $browser = "ff ff36"; else $browser = "ff ff3"; } else if (preg_match('/Firefox/i', $user_agent)) { $browser = "ff"; } else if (preg_match('/MSIE.8/i', $user_agent)) { $browser = "ie ie8"; } else if (preg_match('/MSIE.9/i', $user_agent)) { $browser = "ie ie9"; } else if (preg_match('/MSIE.7/i', $user_agent)) { $browser = "ie ie7"; } else if (preg_match('/MSIE.6/i', $user_agent)) { $browser = "ie ie6"; } else if (preg_match('/Chrome/i', $user_agent)) { $browser = "chrome"; } else if (preg_match('/Safari/i', $user_agent)) { $browser = "safari"; } else { $browser = "in_unknown"; } ?>
© VEM 2024