$u_agent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('/MSIE/i',$u_agent)) {
//ie
}else if(preg_match('/Chrome/i',$u_agent)){
//chrome
}else if(preg_match('/webkit/i',$u_agent)){
//safari
}else if(preg_match('/Firefox/i',$u_agent)){
//firefox
}
No comments:
Post a Comment