Xap is a new rapid PHP-MySQL development engine that offers shorthand syntax, pagination, ORM, caching and more...

PHP QR Code Generator Class

By Shay Anderson on May 2010
Here is my PHP QR code generator class that creates PNG QR code images from text. The class will create various QR code types like text, URLs, emails, etc:
BarcodeQR.zip or BarcodeQR.tgz

Requirements: PHP Web server and cURL Library (client URL).

The PHP QR code class will create a PNG QR code image or save a PNG QR code image file, here is an example: // include BarcodeQR class
include "BarcodeQR.php";

// set BarcodeQR object
$qr = new BarcodeQR();

// create URL QR code

// display new QR code image
This example will create and display this QR code image:

You can also save the QR code PNG image like this: // save new QR code image (size 150x150)
$qr->draw(150, "tmp/qr-code.png");
Other QR code types the class will create:// bookmark
$qr->bookmark("title", "url");

// contact
$qr->contact("name", "address", "phone", "email");

// content
$qr->content("type", "size", "content");

// email
$qr->email("email", "subject", "message");

// geo location
$qr->geo("lat", "lon", "height");

// phone

// sms
$qr->sms("phone", "text");

// text

// URL

// wifi connection
$qr->wifi("type", "ssid", "password");

If you need a PHP Barcode Code 39 generator check out my Barcode 39 generator