PHP Classes

File: readme.txt

Recommend this page to a friend!
  Classes of Omar Ortiz   cQRCode   readme.txt   Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: how to use the class
Class: cQRCode
Generate QRcode images in GIF, JPEG or PNG formats
Author: By
Last change:
Date: 11 years ago
Size: 1,051 bytes


Class file image Download
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