Now it is popular to scan QR code to download the app, do you know how it works?
Scanned QR Code essence is a link, this link will execute a method, according to different mobile system to jump to different app download platform.
Header ("content-type:text/html; Charset=utf-8 "), $user _agent = $_server[' http_user_agent '];//return to the phone system, model information//var_dump ($user _agent); if (Stristr ($_ server[' Http_user_agent ', ' Android ') {//return value is there any android this keyword //echo ' Your phone is: Android system '; header (' location:http://xxx ');} else if (stristr ($_server[' http_user_agent '), ' IPhone ') { //echo ' your phone is: iOS system '; header (' location:https://xxx ');} else if (stristr ($_server[' http_user_agent '), ' WindowsPhone ')} { //echo ' you are using the WindowsPhone system '; header (' Location: Http://xxx ');} Else{header (' location:http://xxx ');}
The above describes how PHP can judge the mobile phone system, including the content, I hope that the PHP tutorial interested in a friend helpful.