Use PHP and JavaScript to determine if the request is from within the browser, Phpjavascript
Browser's Http_user_agent
Under the iphone, return
mozilla/5.0 (IPhone; CPU iPhone os 5_1 like Mac os X applewebkit/534.46 (khtml, like Gecko) mobile/9b176 micromessenger/4.3.2)
Under Android, go back
mozilla/5.0 (Linux; U Android 2.3.6; ZH-CN; gt-s5660 build/gingerbread) applewebkit/533.1 (khtml, like Gecko) version/4.0 Mobile safari/533.1 micromessenger/ 4.5.255)
It is not difficult to find the browser is Micromessenger, and there is a version number, you can also determine whether the phone type of iphone or Android
If you want to do hotlinking
if (Strpos ($_server["Http_user_agent"], "Micromessenger")) echo "Welcome to WeChat word"; else echo "http/1.1 401 Unauthorized ";p ublic function Is_weixin () {if (Strpos ($_server[' http_user_agent '], ' Micromessenger ')!== false) {RE Turn true;} return false;}
JS Judgment
function Is_weixin () { var ua = Navigator.userAgent.toLowerCase (); if (Ua.match (/micromessenger/i) = = "Micromessenger") { return true; } else { return false;} }
When the browser is judged on the phone, you can use the Share JS script to deal with it, you can refer to the official documents, here to provide a case, to understand the approximate process and ideas
http://www.bkjia.com/PHPjc/1049143.html www.bkjia.com true http://www.bkjia.com/PHPjc/1049143.html techarticle use PHP and JavaScript to determine whether the request comes from within the browser, Phpjavascript browser http_user_agent under iphone, return to mozilla/5.0 (iphone; CPU iPhone OS 5_1 like ...