php如何判断浏览器的种类 360的
1个回答
展开全部
function my_get_browser(){
if(empty($_SERVER['HTTP_USER_AGENT'])){
return '命令行,机器人来了!';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 9.0')){
return 'Internet Explorer 9.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 8.0'戚兆)){
return 'Internet Explorer 8.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 7.0')){
return 'Internet Explorer 7.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 6.0')){
return 'Internet Explorer 6.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Firefox')){
return 'Firefox';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Chrome')){
return 'Chrome';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'高闭租],'态态Safari')){
return 'Safari';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Opera')){
return 'Opera';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'360SE')){
return '360SE';
}
}
if(empty($_SERVER['HTTP_USER_AGENT'])){
return '命令行,机器人来了!';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 9.0')){
return 'Internet Explorer 9.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 8.0'戚兆)){
return 'Internet Explorer 8.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 7.0')){
return 'Internet Explorer 7.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 6.0')){
return 'Internet Explorer 6.0';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Firefox')){
return 'Firefox';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Chrome')){
return 'Chrome';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'高闭租],'态态Safari')){
return 'Safari';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'Opera')){
return 'Opera';
}
if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'360SE')){
return '360SE';
}
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询