Php implements scanning of QR codes based on browser type access, php browser type
<? Php $ Agent = $ _ SERVER ['HTTP _ USER_AGENT ']; preg_match ('/android | iphone/I ', $ Agent, $ matches ); if (strtolower ($ matches [0]) = 'android') {// echo "android"; header ("Location :". $ GLOBALS ["public_appconfig"] ["app"] ['android']. "'");} elseif (strtolower ($ matches [0]) = 'iphone') {header ("'location :". $ GLOBALS ["public_appconfig"] ["app"] ['ios ']. "'");} else {// you are not sure about the system or pcheader ("Location :". $ GLOBALS ["public_appconfig" ] ["App"] ['android']. "'") ;}?>
I often see the QR code logon on the Internet and ask how to implement the QR code logon in the PHP program?
On the homepage, you must know that the QR code can be translated into some text or characters.
Process:
Generate a Random verification string for a user, and then generate a QR code. When the user scans the QR code, it corresponds to the user and then logs on to the user.
Of course, you should pay attention to confidentiality and security measures in this process.
How Can I scan the QR code to automatically redirect the website?
Automatic access depends on the QR code scanning software installed on your mobile phone.
Most QR code scanning software will automatically Jump when it reads the URL, and some will first ask if you want to open