<?function Check_wap () {if (Stristr ($_server[' Http_via '), "WAP")) {//Check whether it is a WAP proxy, high accuracy return true; }elseif (Strpos (Strtoupper ($_server[' http_accept ']), "VND. Wap. WML ") > 0) {//check whether the browser accepts WML. return true; }elseif (Preg_match ('/(blackberry|configuration\/cldc|hp |hp-|htc |htc_|htc-|iemobile|kindle|midp|mmp|motorola| Mobile|nokia|opera Mini|opera | googlebot-mobile| yahooseeker\/m1a1-r2d2|android|iphone|ipod|mobi|palm|palmos|pocket|portalmmm|ppc;|smartphone|sonyericsson|sqh| Spv|symbian|treo|up.browser|up.link|vodafone|windows ce|xda |xda_)/I ', $_server[' http_user_agent '])) {//Check User_ AGENT return true; }else{return false; }}if (Check_wap () &&!$_get[' m ']) {Header (' Location:http://www.sdceo.com/?m=wap ');}?><!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>PHP determines if the mobile client</title></Head><Body></Body></HTML>
PHP to determine if it is a mobile client