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    
Ratings Unique User Downloads Download Rankings
StarStarStar 52%Total: 1,280 All time: 3,001 This week: 131Up
Version License PHP version Categories
cqrcode 1GNU General Publi...5.2PHP 5, Graphics


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
Age: 54
All time rank: 6398 in Mexico Mexico
Week rank: 307 Up4 in Mexico Mexico Up
Innovation award
Innovation award
Nominee: 2x


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

  • cqrcode.png
  • numbers.png
  • phpclasses.jpg
  • phpnet.gif
  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,001
This week:131Up
User Ratings User Comments (4)
 All time