PHP Classes
elePHPant
Icontem

cQRCode: Generate QRcode images in GIF, JPEG or PNG formats

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-12-26 (3 years ago) RSS 2.0 feedStarStarStar 54%Total: 1,179 All time: 3,092 This week: 1,016Up
Version License PHP version Categories
cqrcode 1GNU General Publi...5.2PHP 5, Graphics
Description Author

This class can generate QRcode images in GIF, JPEG or PNG formats.

It takes a string of information to encode and generates an image that represents the string as a QRcode.

The generated image can be served as the current script output or saved to a file in GIF, PNG, or JPEG formats.

The size of matrix points and the error correction level parameters are configurable.

Picture of Omar Ortiz
  Performance   Level  
Name: Omar Ortiz <contact>
Classes: 5 packages by
Country: Mexico Mexico
Innovation award
Innovation award
Nominee: 2x

Details
Steps to generate a QR code:
1. Include cQRCode.php library in your script
require_once("cQRCode.php");
2. create a cQRCode object
$qr1 = new cQRCode("Class cQRCode",ECL_M);
1st parameter is the string you want to encode
2nd parameter is the error level, yo can choose (ECL_L, L, "L", "l"),(ECL_M, M, "M", "m"),(ECL_Q, Q, "Q", "q"), (ECL_H, H, "H", "h")
3th parameter is experimental, true means you want rounder corners in your qr code ($qr1 = new cQRCode("Class cQRCode",ECL_M, true);)
3. Generate image
$qr1->getQRImg("PNG","cqrcode");
1st parameter is the format type (PNG,"PNG"),(JPG,"JPG"),(GIF,"GIF")
2nd parameter is the name of the file (without extension) if you omit this parameter, the image is output to screen
The image is generate in tmp directory, see FILE_PATH constant in cQRCode.php library
Yo can change the module size in pixels, see PXS constant in cQRCode.php library

You can see, step by step, the process to generate QR Codes if you active DEBUG mode, see DEBUG and DEBUG_LEVEL constants in cQRCode.php library
Screenshots  
  • phpnet.gif
  • phpclasses.jpg
  • numbers.png
  • cqrcode.png
  Files folder image Files  
File Role Description
Plain text file cQRCode.php Class cQRCode class file
Accessible without login Plain text file example.php Example Example file
Accessible without login Plain text file readme.txt Doc. how to use the class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,179
This week:0
All time:3,092
This week:1,016Up
User Ratings User Comments (4)
 All time
Utility:75%StarStarStarStar
Consistency:56%StarStarStar
Documentation:56%StarStarStar
Examples:56%StarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:1681