


Scan the same QR code to access different download addresses according to browser type, browser type_PHP tutorial
Jul 13, 2016 am 10:17 AMScan the same QR code to access different download addresses according to the browser type, browser type
<span> 1</span> <?<span>php </span><span> 2</span> <span> 3</span> <span>$Agent</span> = <span>$_SERVER</span>['HTTP_USER_AGENT'<span>]; </span><span> 4</span> <span>preg_match</span>('/android|iphone/i',<span>$Agent</span>,<span>$matches</span><span>); </span><span> 5</span> <span>if</span> (<span>strtolower</span>(<span>$matches</span>[0]) == 'android'<span>) { </span><span> 6</span> <span>//</span><span> echo "安卓";</span> <span> 7</span> <span>header</span>("Location: ".<span>$GLOBALS</span>["public_appconfig"]["app"]['android']."'"<span>); </span><span> 8</span> } <span>elseif</span> (<span>strtolower</span>(<span>$matches</span>[0]) == 'iphone'<span>) { </span><span> 9</span> <span>header</span>("'Location: ".<span>$GLOBALS</span>["public_appconfig"]["app"]['ios']."'"<span>); </span><span>10</span> }<span>else</span><span>{ </span><span>11</span> <span>//</span><span>不確定是什么系統(tǒng)或者是pc</span> <span>12</span> <span>header</span>("Location: ".<span>$GLOBALS</span>["public_appconfig"]["app"]['android']."'"<span>); </span><span>13</span> <span> } </span><span>14</span> <span>15</span> <span>16</span> ?>
Use regular expressions to determine whether it is a URL
and then use Intent to jump to the browser
You can put these two on the same website page, and then make the URL link into a QR code, so that people who need to download can choose to download, as shown below

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

First, download the Binance App through the official channel to ensure security. 1. Android users should visit the official website, confirm that the URL is correct, download the Android installation package, and enable the "Allow to install applications from unknown sources" permission in the browser. It is recommended to close the permission after completing the installation. 2. Apple users need to use a non-mainland Apple ID (such as the United States or Hong Kong), log in to the ID in the App Store and search and download the official "Binance" application. After installation, you can switch back to the original Apple ID. 3. Be sure to enable two-factor verification (2FA) after downloading and keep the application updated to ensure account security. The entire process must be operated through official channels to avoid clicking unknown links.

Ethereum is a decentralized open source platform based on blockchain technology, which allows developers to build and deploy smart contracts and decentralized applications. Its native cryptocurrency is Ethereum (ETH), which is one of the leading digital currencies with market value in the world.

Ouyi is a world-leading digital asset trading platform, providing users with safe, stable and reliable digital asset trading services, and supports spot and derivative transactions of various mainstream digital assets such as Bitcoin (BTC), Ethereum (ETH). Its strong technical team and risk control system are committed to protecting every transaction of users.

Bitcoin (BTC) is the world's first decentralized digital currency. Since its debut in 2009, it has become the leader in the digital asset market with its unique encryption technology and limited supply. For users who are following the cryptocurrency space, it is crucial to keep track of their price dynamics in real time.

When using Yandex to find the official Binance channel, you must accurately locate the official website by searching for "Binance Official Website" or "Binance Official Website"; 2. After entering the official website, find the "Download" or "App" entrance in the header or footer, and follow the official guidelines to download or obtain the officially verified installation files through the app store; 3. Avoid clicking on advertisements or third-party links throughout the process, ensure that the domain name is correct and the link is trustworthy, so as to ensure the download security.

Open Yandex browser; 2. Search for "Binance Official Website" and enter the official website link with "binance"; 3. Click the "Download" or mobile phone icon on the page to enter the download page; 4. Select the Android version; 5. Confirm the download and obtain the installation file package; 6. After the download is completed, click on the file and follow the prompts to complete the installation; you must always download through the official channel to avoid malware, pay attention to application permission requests, and regularly update the application to ensure security. The entire process requires careful identification of the official website and reject suspicious links, and finally successfully install the Binance app.

Binance is the world's leading digital asset trading platform, providing users with secure, stable and convenient cryptocurrency trading services. It supports the transaction of a variety of digital currencies and provides spot, contract and other functions.

Android users need to download the installation package through official channels, enable the "Allow to install applications from unknown sources" permission before completing the installation; 2. Apple users need to use Apple IDs in mainland China to log in to the App Store and search for "OKX" to download the official application. After installation, they can switch back to the original account; 3. Always download and keep the application updated through official channels, beware of phishing websites and false applications to ensure the security of accounts and assets.
