How HP generates QR Code: 1.google Open api;2.php class library PHP QR code;3.libqrencode;4.qrcode Perl CGI & PHP Scripts interested friends can refer to the next ha.
1.google Open API
The code is as follows:
$urlToEncode = "http://bbs.lewanchina.com"; 
Generateqrfromgoogle ($urlToEncode); Function Generateqrfromgoogle ($chl, $widhtHeight = ' ", $EC _level= ' L ', $margin = ' 0 ')  
{
$url = UrlEncode ($url);  
Echo ' ';  
} 
2.php class library PHP QR Code
PHP QR Code is the Open source (LGPL) library for generating QR code,
2-dimensional Barcode. Based on Libqrencode C Library,
Provides API for creating QR Code barcode Images (PNG, JPEG thanks to GD2).
Implemented purely in PHP, with no external dependencies (except GD2 if needed).
Address: http://phpqrcode.sourceforge.net/
Download: http://sourceforge.net/projects/phpqrcode/
Example:
The code is as follows:
<?&NBSP;
include "./phpqrcode/phpqrcode.php"; $value = "Http://www.weste.net"; $errorCorrectionLevel = "L"; $matrixPointSize = "4"; QRCode::p ng ($value, False, $errorCorrectionLevel, $matrixPointSize); Exit; &NBSP
? >&NBSP;
Home Address: http://phpqrcode.sourceforge.net/, the site can directly download the source code, download and extract to the Web directory, through the Web Access, you can see the demo demo.
Data indicates the number of records to be recorded if the Utf-8 encoding is stored in Chinese, up to 984.
ECC indicates the level of error correction, the higher the error correction level, the larger the image will be generated.
L Loadline of level 7% can be modified
Loadline of M level 15% can be corrected
Q-level 25% loadline can be corrected
The loadline of H level 30% can be corrected size to indicate the pixels of each black point of the picture.
Example of code invocation:
The code is as follows:
Include "qrlib.php";
QRCode::p ng ($data, $filename, $errorCorrectionLevel, $matrixPointSize, $margin);
/*
$data Data
$filename the name of the saved picture
$errorCorrectionLevel Error Handling level
$matrixPointSize pixels for each black point
$margin white border pixels outside the picture
*/
QR Code detailed principle can refer to the QR Wikipedia, the Chinese version of the relatively few, the English version of the introduction is very comprehensive, It is recommended to read the English version. &NBSP;
In addition, now the QR code already has the color version, but also can embed the individuality picture, I have done some research in this aspect, if has the interest, may contact me to communicate. My contact email reference site to the right column. &NBSP;
3.libqrencode&NBSP;
Address: Http://fukuchi.org/works/qrencode/index.en.html&NBSP;
PHP support please refer to: http ://hirokawa.netflowers.jp/entry/4900/&NBSP;
4.QRcode Perl CGI & PHP Scripts&NBSP;
Address: http://www.swetake.com/qr/qr_cgi.html
Several ways to organize and use PHP to generate two-dimensional code