手机访问pc网站自动跳转手机端网站PHP代码

 

 
$agent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($agent,"comFront")  strpos($agent,"iPhone")  strpos($agent,"MIDP-2.0")  strpos($agent,"Opera Mini")  strpos($agent,"UCWEB")  strpos($agent,"Android")  strpos($agent,"Windows CE")  strpos($agent,"SymbianOS"))
header("Location:http://chinahoby");

 

posted @ 2014-10-27 16:59  求必印  阅读(4828)  评论(0编辑  收藏  举报