1.google Open API
Copy Code code as follows:
$urlToEncode = "http://bbs.lewanchina.com";
Generateqrfromgoogle ($urlToEncode);
function Generateqrfromgoogle ($chl, $widhtHeight = ' _level= ', $EC ' L ', $margin = ' 0 ')
{
$url = UrlEncode ($url);
Echo ' ';
}
2.php class library PHP QR Code
The 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-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/
Instance:
Copy Code code as follows:
?
Include "./phpqrcode/phpqrcode.php";
$value = "Http://www.weste.net";
$errorCorrectionLevel = "L";
$matrixPointSize = "4";
QRCode::p ng ($value, False, $errorCorrectionLevel, $matrixPointSize);
Exit
?>
Home Address: http://phpqrcode.sourceforge.net/, the site can download the source directly, download and extract to the Web directory, through the Web Access, you can see demo demo.
Data represents the number of records to be recorded, if it is stored utf-8 encoded in Chinese, up to 984.
ECC indicates the level of error correction, the higher the level of error correction, the larger the picture will be generated.
L level 7% codewords can be corrected.
Codewords of M level 15% can be corrected
Q level 25% of codewords can be modified
The codewords of H level 30% can be modified to represent the pixels of each black dot in the picture.
Example of code invocation:
Copy Code code as follows:
Include "qrlib.php";
QRCode::p ng ($data, $filename, $errorCorrectionLevel, $matrixPointSize, $margin);
/*
$data data
Name of $filename saved picture
$errorCorrectionLevel Error Handling level
$matrixPointSize pixels for each black dot
$margin white border pixels around a picture
*/
QR Code detailed principle can refer to QR Wikipedia, the Chinese version introduction is relatively few, the English version introduction is very comprehensive, the recommendation looks English edition.
In addition, now QR code has a color version of the, can also embed personality pictures, I have done some research in this area, if interested, you can contact me and exchange. My contact email reference site to the right column.
3.libqrencode
Address: http://fukuchi.org/works/qrencode/index.en.html
PHP support please refer to: http://hirokawa.netflowers.jp/entry/4900/
4.QRcode Perl CGI & PHP Scripts
Address: http://www.swetake.com/qr/qr_cgi.html
PS: Here again to provide a two-dimensional site code tools (with logos and a variety of custom functions), the function is very powerful! Free for everyone to use:
Http://tools.jb51.net/transcoding/jb51qrcode