Home >Backend Development >PHP Tutorial >PHP generates QR code program code_PHP tutorial
There are many programs for generating QR codes on the Internet. We found that Google and some foreign websites provide plug-ins or APIs for generating QR codes for free. Let me introduce several to you.
The simplest and most practical goolge open source method
1.google open api
Example
The code is as follows
|
Copy code
|
||||
$urlToEncode="http://gz.altmi.com" ; generateQRfromGoogle($urlToEncode);function generateQRfromGoogle($chl,$widhtHeight ='150',$EC_level='L',$margin='0') { $url = urlencode($url);
} The above method is simple and fast, only a few sentences are enough, but there are some shortcomings It calls the Google server. If Google does not provide services, we will not be able to . Let’s look at the 2.php class library PHP QR Code Statement: The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn Previous article:PHP infinite classification (with layer depth) algorithm_PHP tutorialNext article:PHP infinite classification (with layer depth) algorithm_PHP tutorial Related articlesSee more |