PHP Classes

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 (4 years ago) RSS 2.0 feedStarStarStar 54%Total: 1,195 All time: 3,084 This week: 607Up
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.

  Performance   Level  
Name: Omar Ortiz <contact>
Classes: 5 packages by
Country: Mexico Mexico
Age: 47
All time rank: 6348 in Mexico Mexico
Week rank: 970 Down14 in Mexico Mexico Down
Innovation award
Innovation award
Nominee: 2x

Steps to generate a QR code:
1. Include cQRCode.php library in your script
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
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
  • 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  
This week:0
All time:3,084
This week:607Up
User Ratings User Comments (4)
 All time