Php solves the problem of scanning QR code download and redirection, and php scanning and redirection
Php solves the problem of scanning QR code download and redirection
First we specify a url, such as the http://it.lovepet.vip
Use this address to generate a QR code. There are many ways to generate a QR code.
We can create a new index. php file and place it in the directory of the modified website. Edit index. php and add
$ Agent = strtolower (_ SERVER ['HTTP _ USER_AGENT ']); $ iphone = (strpos ($ agent, 'iphone '))? True: false; $ ipad = (strpos ($ agent, 'ipad '))? True: false; $ android = (strpos ($ agent, 'android '))? True: false; if ($ iphone | $ ipad) {echo "<script> window. location. href = 'https: // itunes.apple.com/cn/app/wu-han-de-tie-gong-e/id663196252? Mt = 8' </script> ";} if ($ android) {echo" <script> window. location. href = 'HTTP: // www.lewanau.com '</script> ";}
In this way, when scanning the QR code on your mobile phone, you can jump to different URLs through the device.
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!