|  |      1megaforce      2014-02-10 11:33:47 +08:00  2 | 
|  |      2xream      2014-02-10 11:34:31 +08:00  1 | 
|  |      3zencoding      2014-02-10 11:34:47 +08:00  1 $mobile_agents = array('w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','oper','palm','pana','pant','phil','play','port','prox','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-' ); | 
|  |      4explon      2014-02-10 11:37:03 +08:00  1 function is_mobile() { $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']); if (preg_match('/playstation/i', $user_agent) OR preg_match('/ipad/i', $user_agent) OR preg_match('/ucweb/i', $user_agent)) { return false; } if (preg_match('/iemobile/i', $user_agent) OR preg_match('/mobile\ssafari/i', $user_agent) OR preg_match('/iphone\sos/i', $user_agent) OR preg_match('/android/i', $user_agent) OR preg_match('/symbian/i', $user_agent) OR preg_match('/series40/i', $user_agent)) { return true; } return false; } | 
|  |      5zenxds      2014-02-10 11:38:29 +08:00  1 /(iPod|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian)/gi | 
|  |      9regent      2014-02-10 20:46:37 +08:00 我之前用的一个方法是,把WordPress上面的移动版面插件打开看看,里面有关于UA的判断 | 
|  |      10vibbow      2014-02-11 05:35:01 +08:00 UA识别大全: http://browscap.org/ |