<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_48303"> <div class="blockcode"> <div id="code_Msy"><ol> <li> <li><?php<li>// check if wap <li>function check_wap(){<li> if(stristr($_SERVER['HTTP_VIA'],"wap")){// 先检查是否为wap代理,准确度高<li> return true;<li> }elseif(strpos(strtoupper($_SERVER['HTTP_ACCEPT']),"VND.WAP.WML") > 0){// 检查浏览器是否接受 WML.</li> <li> return true;</li> <li> }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'])){//检查USER_AGENT</li> <li> return true; </li> <li> }else{</li> <li> return false; </li> <li> }</li> <li>}</li> </ol></div> <em onclick="copycode($('code_Msy'));">复制代码</em> </div> </td></tr></table> <div id="comment_48303" class="cm"> </div> <div id="post_rate_div_48303"></div> <br><br>