傅令江的光影色彩世界
php判断客户端是否为手机
2014-7-10 令狐江
<?php
$agent = $_SERVER['HTTP_USER_AGENT']; 
if(strpos($agent,"NetFront") || 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://www.hdtimes.cn/index.php?m=wap&siteid=1"); }
?>
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容