Check whether it is mobile access. From: www.e2003.net without functioniswap () {if HTTP_X_WAP_PROFILE exists, it must be a mobile device if (isset ($ _ SERVER [HTTP_X_WAP_PROFILE]) {returntrue ;} if the via information contains wap, it must be a mobile device. Some service providers block this information if (isset (
Check whether it is mobile access. From: http://www.e2003.net no function iswap () {// if there is HTTP_X_WAP_PROFILE, it must be a mobile device if (isset ($ _ SERVER ['HTTP _ X_WAP_PROFILE ']) {return true ;} // if the via information contains wap, it must be a mobile device. Some service providers block this information if (isset (
Check whether it is mobile access.
From: http://www.e2003.net <无>
Function iswap () {// if there is HTTP_X_WAP_PROFILE, it must be a mobile device if (isset ($ _ SERVER ['HTTP _ X_WAP_PROFILE ']) {return true ;} // if the via information contains wap, it must be a mobile device. Some service providers will block this information if (isset ($ _ SERVER ['HTTP _ Ve']) {// cannot be found as flase; otherwise, it is truereturn stristr ($ _ SERVER ['HTTP _ pass'], "wap ")? True: false;} // identifies the client flag sent by the mobile phone. The compatibility needs to be improved if (isset ($ _ SERVER ['HTTP _ USER_AGENT ']). {$ clientkeywords = array ('nokia ', 'sony', 'ericsson ', 'mot', 'samsung', 'htc ', 'sgh', 'lg ', 'sharp ', 'sie-', 'philips ', 'panasonic', 'alcatel', 'lenovo ', 'iphone', 'ipod ', 'blackberry ', 'meizu', 'android', 'netfront', 'symbian ', 'ucweb', 'windowsce', 'palm ', 'operamini', 'operamobi', 'openwave ', 'nexusone', 'cldc', 'midp ', 'wap', 'mobile'); // from HTTP_USE In R_AGENT, search for the keyword if (preg_match ("/(". implode ('|', $ clientkeywords ). ")/I", strtolower ($ _ SERVER ['HTTP _ USER_AGENT ']) {return true ;}} if (isset ($ _ SERVER ['HTTP _ ACCEPT ']) {// if only wml is supported and html is not supported, it must be a mobile device if (strpos ($ _ SERVER ['HTTP _ ACCEPT '], 'vnd. wap. wml ')! = False) & (strpos ($ _ SERVER ['HTTP _ ACCEPT '], 'text/html ') === false | (strpos ($ _ SERVER ['HTTP _ ACCEPT '], 'vnd. wap. wml ') <strpos ($ _ SERVER ['HTTP _ ACCEPT'], 'text/html ') {return true ;}} return false ;}