PHP determines whether the mobile client is used. PHP determines the mobile client
<? Function check_wap () {if (stristr ($ _ SERVER ['HTTP _ VIA '], "wap") {// first 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-| htc _ | htc-| iemobile | kindle | midp | mmp | motorola | mobile | nokia | opera mini | opera | Googlebot-Mobile | YahooSeeker \/M1A1-R2D2 | android | iphone | ipod | mob I | palm | palmos | pocket | portalmmm | ppc; | smartphone | sonyericsson | sqh | spv | symbian | treo | up. browser | up. link | vodafone | windows ce | 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">