PHP implementation scan QR code to access different download addresses based on browser type, PHP browser type
<?php$agent = $_server[' http_user_agent '];p reg_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{//is not sure what system or Pcheader ("Location:". $GLOBALS ["Public_appconfig"] ["app"] [' Android ']. " >
Often see the online two-dimensional code login, ask PHP program how to implement the QR code login?
Home you need to know that the QR code can be translated into some words or characters.
Process:
Generates a random validation string for a user, then generates a QR code that corresponds to the user when the user scans the QR code, and then logs on to the user.
Of course, in the process of attention to confidentiality and security measures.
How to implement scanning QR code, to achieve automatic URL jump?
can automatically access to see your phone installed QR code scanning software function
Most QR code scanning software will automatically jump to the URL, and some will ask you to open it first.
http://www.bkjia.com/PHPjc/894133.html www.bkjia.com true http://www.bkjia.com/PHPjc/894133.html techarticle PHP Implementation scan QR code according to browser type to access different download address, php browser type php$agent = $_server[' http_user_agent '];p reg_match ('/android|iphone/i ', $ Agent, $matches);