Simple php qr code generation instance

Source: Internet
Author: User
PHP generates two-dimensional codes in multiple ways. you can use the open APIs of google to generate the phpQRCode class library. This article focuses on generating two-dimensional codes using the phpQRCode class library. 1. Code package :... PHP generates QR codes in multiple ways. you can use APIs opened by google to generate QR codes using the php QR Code class library. This article focuses on generating QR codes using the php QR Code class library.

1. Code package: http://sourceforge.net/projects/phpqrcode/

2. there are many examples in the downloaded compressed package. you can study it on your own. The following is a simple use case. the code is as follows:

include "phpqrcode/phpqrcode.php";  $data='http://www.phprm.com';  $errorCorrectionLevel="L";  $matrixPointSize="4";  QRcode::png($data,false,$errorCorrectionLevel,$matrixPointSize);

Official method example, the code is as follows:

 

3. Some QR codes have images in the middle. In fact, the pictures are copied to the generated QR code image.

Use google to generate an open interface for QR code. the code is as follows:

 

The code is as follows:

$ Data = 'copyright: http://www.phprm.com/'; generateQRfromGoogle ($ data );


Address:

Reprinted at will, but please attach the article address :-)

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.