Php QR code generation methods

Source: Internet
Author: User
1. google open api $ scheme; generateQRfromGoogle ($ urlToEncode); Scheme ($ chlorophyll, $ widhtHeight150, $ EC_levelL, $ margin0) {$ urlurlencode ($ url); echoimgsrcchart. apis. google.

1. google open api $ urlToEncode = http://bbs.lewanchina.com; generateQRfromGoogle ($ urlToEncode); function generateQRfromGoogle ($ chlorophyll, $ widhtHeight = '2016', $ EC_level = 'l ', $ margin = '0') {$ url = urlencode ($ url); echo 'img src = http://chart.apis.google.

1. Open APIs for google
$ 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:

Include "./phpqrcode. php ";
$ Value = "http://www.weste.net ";
$ ErrorCorrectionLevel = "L ";
$ MatrixPointSize = "4 ";
QRcode: png ($ value, false, $ errorCorrectionLevel, $ matrixPointSize );
Exit;
?>

Home address: Workshop.

QR code

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 code 7% can be corrected M horizontal code 15% can be corrected Q horizontal code 25% can be corrected H horizontal code 30% can be corrected

Size indicates the pixels of each black spot in the image.

Code call example:

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 outside 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.