Is it a judgment done in PHP, or is it done in Web server?
Is it in the index.php? This file has been processed in front of the host, but does not see the logic associated with the user agent. Want to ask the discuzX3 is where, how to make a judgment?
Thank you ~
Reply content:
Is it a judgment done in PHP, or is it done in Web server?
Is it in the index.php? This file has been processed in front of the host, but does not see the logic associated with the user agent. Want to ask the discuzX3 is where, how to make a judgment?
Thank you ~
没看到和user agent有关的逻辑
You didn't find it!
function Checkmobile () {Global $_g; $mobile = Array (); Static $touchbrowser _list =array (' iphone ', ' Android ', ' phone ', ' mobile ', ' wap ', ' NetFront ', ' Java ', ' opera Mobi ', ' opera M ' INI ', ' ucweb ', ' Windows CE ', ' Symbian ', ' series ', ' webOS ', ' Sony ', ' BlackBerry ', ' dopod ', ' Nokia ', ' Samsung ', ' palmsource ', ' xda ', ' pieplus ', ' Meizu ', ' MIDP ', ' CLDC ', ' Motorola ', ' Foma ', ' DoCoMo ', ' Up.browser ', ' Up.link ', ' blazer ', ' helio ', ' hosin ', ' Huawei ', ' Novarra ', ' Coolpad ', ' webOS ', ' techfaith ', ' PalmSource ', ' Alcatel ', ' Amoi ', ' Ktouch ', ' Nexian ', ' Ericsson ', ' Philips ', ' Sagem ', ' wellcom ', ' Bunjalloo ', ' Maui ', ' SMARTP ' Hone ', ' iemobile ', ' spice ', ' bird ', ' zte-', ' longcos ', ' Pantech ', ' Gionee ', ' portalmmm ', ' Jig browser ', ' Hi Ptop ', ' BenQ ', ' Haier ', ' ^lct ', ' 320x320 ', ' 240x320 ', ' 176x220 ', ' windows Phone '); static $wmlbrowser _list = Array (' Cect ', ' compal ', ' ctl ', ' LG ', ' nec ', ' tcl ', ' Alcatel ', ' Ericsson ', ' B 'Ird ', ' Daxian ', ' Dbtel ', ' eastcom ', ' Pantech ', ' Dopod ', ' Philips ', ' Haier ', ' Konka ', ' Kejian ', ' Lenovo ', ' BenQ ' , ' mot ', ' Soutec ', ' Nokia ', ' Sagem ', ' sgh ', ' sed ', ' capitel ', ' Panasonic ', ' SonyEricsson ', ' sharp ', ' amoi ', ' PA NDA ', ' ZTE '); static $pad _list = Array (' ipad '); $useragent = Strtolower ($_server[' http_user_agent '); if (Dstrpos ($useragent, $pad _list)) {return false; } if ($v = Dstrpos ($useragent, $touchbrowser _list, True)) {$_g[' mobile '] = $v; Return ' 2 '; } if ($v = Dstrpos ($useragent, $wmlbrowser _list))) {$_g[' mobile '] = $v; Return ' 3 '; WML Edition} $brower = Array (' Mozilla ', ' Chrome ', ' Safari ', ' opera ', ' m3gate ', ' winwap ', ' Openwave ', ' myop '); if (Dstrpos ($useragent, $brower)) return false; $_g[' mobile '] = ' unknown '; if (Isset ($_g[' mobiletpl '][$_get[' mobile '])) {return true; } else {return false; }}