1. Open APIs for google
Copy codeThe Code is as follows: $ urlToEncode = "http://bbs.lewanchina.com ";
GenerateQRfromGoogle ($ urlToEncode );
Function generateQRfromGoogle ($ chlorophyll, $ widhtHeight = '000000', $ EC_level = 'l', $ margin = '0 ')
{
$ Url = urlencode ($ url );
Echo ' ';
}
2. php QR Code library
Php qr Code is open source (LGPL) library for generating QR Code,
2-dimen1_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 (effect GD2 if needed ).
Address: http://phpqrcode.sourceforge.net/
Download: http://sourceforge.net/projects/phpqrcode/
Instance:Copy codeThe Code is as follows: <?
Include "./phpqrcode. php ";
$ Value = "http://www.weste.net ";
$ ErrorCorrectionLevel = "L ";
$ MatrixPointSize = "4 ";
QRcode: png ($ value, false, $ errorCorrectionLevel, $ matrixPointSize );
Exit;
?>
Home address: Workshop.
Data indicates the Data to be recorded. A maximum of 984 UTF-8 encoded Chinese characters can be stored.
ECC indicates the error correction level. The higher the error correction level, the larger the image to be generated.
L horizontal 7% code can be corrected
The M-level 15% code can be corrected.
Q level 25% code can be corrected
The H-level 30% font Size can be corrected to indicate the pixels of each black spot in the image.
Code call example:Copy codeThe Code is as follows: include "qrlib. php ";
QRcode: png ($ data, $ filename, $ errorCorrectionLevel, $ matrixPointSize, $ margin );
/*
$ Data
$ Name of the image saved by filename
$ ErrorCorrectionLevel error handling level
$ MatrixPointSize pixels of each black spot
$ White border pixels on the periphery of the margin Image
*/
For details about the QR code, refer to the QR Wikipedia. The Chinese version is rarely described. The English version is very comprehensive. We recommend that you read the English version.
In addition, QR codes already have a color version and can be embedded with personalized images. I have done some research in this area. If you are interested, please contact me. For my contact email address, see the column on the right of the website.
3. libqrencode
Address: http://fukuchi.org/works/qrencode/index.en.html
Php support see: http://hirokawa.netflowers.jp/entry/4900/
4. QRcode Perl CGI & PHP scripts
Address: http://www.swetake.com/qr/qr_cgi.html