PHP Classes
elePHPant
Icontem

PHP QR Code Generator: Generate QR Code images in pure PHP

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (21)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-11-07 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 797 This week: 1All time: 4,119 This week: 1,047Up
Version License PHP version Categories
phpqr 1.0.24BSD License5.0PHP 5, Graphics
Description Author

This package can generate QR Code images in pure PHP.

The main class can take a given string of data and generates the matrix of QR Code points. The type of QR code and error correction level are configurable parameters.

A separate class can render the generated QR Code and render it as a JPEG image of a given width and height. The generated image is return as a string of JPEG image data.

This package is inspired on Jerome Etienne jQuery plugin.

Recommendations

What is the best PHP qr code generation class?
I need php code to generate qr code offline

Picture of Maik Greubel
  Performance   Level  
Name: Maik Greubel <contact>
Classes: 6 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 3x

Details

phpQr - A QRCode encoder class

by Maik Greubel (greubel@nkey.de)

The intention to create a basic qrcode encoder for PHP was a request on phpclasses.org.

The author studied multiple sources to get an idea how qrcode implementation works under the hood. The best source was the JavaScript library jquery which provides a HTML Table based implementation. See source and documentation at <https://github.com/jeromeetienne/jquery-qrcode>

So the hard work was already done by Jerome Etienne. My part was only to port it to PHP code.

Currently this package does not have the capability to read QRCodes.

Further readings

For a detailed description of QRCode and its features please check <http://www.qrcode.com/>

Trademark information

QR Code is registered trademark of DENSO WAVE INCORPORATED <http://www.denso-wave.com/qrcode/faqpatent-e.html>

License

All files in the package are published under the terms of the BSD 2 License. <http://opensource.org/licenses/BSD-2-Clause>

  DemoExternal page  
Screenshots  
  • tests/unicode-test.jpg
  • tests/test.jpg
  Files folder image Files  
File Role Description
Files folder imagesrc (12 files)
Files folder imagetests (2 files)
Accessible without login Plain text file README.md Doc. Readme
Accessible without login Plain text file composer.json Data composer artifact to retrieve dependencies
Accessible without login Plain text file ErrorHandler.php Aux. A simple error handler which translates notices, warnings and errors into exceptions
Accessible without login Plain text file phpdoc.dist.xml Data phpDocumentor configuration
Accessible without login Plain text file qrcode-display.php Example demo for displaying image in browser
Accessible without login Plain text file qrcode-form.php Example example script which provides a form
Accessible without login Plain text file SimpleLogger.php Aux. My simple logger class

  Files folder image Files  /  src  
File Role Description
  Plain text file QR8bitByte.php Class This class provides the 8bit Byte implementaton of a QRByte
  Plain text file QRBitBuffer.php Class The purpose of this class is to act as data holder for QRCode
  Plain text file QRByte.php Class This interface describes a QRByte implementation
  Plain text file QRCode.php Class This is the main class
  Plain text file QRCodeException.php Class A derived exception
  Plain text file QRCodeImage.php Class This class provides all needed functionality to create an image out of an QRCode bitmap
  Plain text file QRErrorCorrectLevel.php Class Error correct level enumeration
  Plain text file QRMath.php Class QRCode math helper class
  Plain text file QRMode.php Class QRCode mode enumeration
  Plain text file QRPolynominal.php Class The purpose of this class is to provide a polynominal implementation for the QRCode package
  Plain text file QRRSBlock.php Class This class is a Reed-Solomon implementation for the QRCode.
  Plain text file QRUtil.php Class QRCode common utility functions

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file qrcode-test.php Example A sample script
  Accessible without login Plain text file unicode-test.php Example A test for unicode data

 Version Control Unique User Downloads Download Rankings  
 0%
Total:797
This week:1
All time:4,119
This week:1,047Up