Introducing a NEW QR Generator
When people ask me which QR generator to use, I usually suggest Google Charts. However, recently I’ve become dissatisfied with its limitations, so I’ve decided to write and release my own QR encoder.
I’m still looking for a catchy name for it (suggestions welcomed) – so for now it’s called “QR Generator PHP”.
It’s available on GitHub or you can use it directly.
So, how does it compare to Google Charts?
| Feature | New QR Encoder | Google Charts |
|---|---|---|
| Image Formats | PNG, JPG, GIF | PNG |
| Maximum Image Size | 1480*1480px | 547*547px |
| Unicode Support | Yes | No |
| Downloadable Images | Yes- to a specific filename | No |
| Open Source | Yes | No |
| Run on your own webserver? | Yes | No |
Usage
Usage is really simple.
To generate a QR code which says “hello”:
qr.php?d=hello
(Click to see the QR code)
You can set the size with, oddly enough, the size parameter:
qr.php?d=hello&size=1000
Size can be up to 1480 pixels.
You can set the image format to JPG or GIF. By default it outputs PNG.
qr.php?d=hello&t=J
The Error Correction can be set to L, M, Q, or H.
qr.php?d=hello&e=H
You can also tell the web browser to download the image – rather than just display it. The “download” parameter sets the filename for the image.
qr.php?d=hello&t=g&download=testing
The file will be called testing.gif (filetype is determined automatically)
Installation and configuration
Installing the software on your web server is easy. You need PHP4.1 or higher and gd 1.6 or higher. Those are fairly old versions, so any competent web host will have those.
There are three folders.
|_php |_data |_image
DO NOT TOUCH THE CONTENTS OF THE data AND image FOLDERS.
Inside the php folder, you’ll find the “qr.php” file.
There are only two things you need to configure – the location of the data and image folders
- $path = "./../data"; // You must set path to data files.
- $image_path = "./../image"; // You must set path to QRcode frame images.
By default, they’re set up to be accessed without any modification. But, if you desperately want to move them to a different location, make sure you update qr.php.
Copyright
I’ve based my QR generator on that of Swetake. The original was licensed as “revised BSD” – I have kept the original licence.
Feedback
If you’ve got any feedback – either leave it in the comments here, or over at GitHub.
3 Responses to Introducing a NEW QR Generator
Leave a Reply Cancel reply
Buy My Time – MinuteBox
Switch site
QR Code
Tags
advertising android api Apple badvertising bbc bit.ly blackberry blog books dabr data drm ebook ebooks google government guardian iphone kindle linux meta microsoft mobile movies nablopomo news nokia oauth php politics qr qr code qr codes qrpedia review security stats twitter ubuntu usability video vodafone wikipedia wp7Recent Comments
- Terence Eden on Twitter API – pagination and IDs
- Riccardo on Twitter API – pagination and IDs
- Steve Harris on The SIM-less Phone Is Coming. And It Should Scare The Shit Out Of You
- Terence Eden on The SIM-less Phone Is Coming. And It Should Scare The Shit Out Of You
- Roger Parkinson (@RogerParkinson) on The SIM-less Phone Is Coming. And It Should Scare The Shit Out Of You
Categories
- /etc/ (175)
- badvertising (39)
- linux (22)
- mobile (187)
- politics (44)
- qr (80)
- qrpedia (26)
- Shakespeare (1)
- usability (39)
- voteuk (9)
- Woody Allen Challenge (5)
Archives
- May 2012 (7)
- April 2012 (15)
- March 2012 (13)
- February 2012 (8)
- January 2012 (14)
- December 2011 (17)
- November 2011 (30)
- October 2011 (7)
- September 2011 (11)
- August 2011 (5)
- July 2011 (6)
- June 2011 (8)
- May 2011 (8)
- April 2011 (12)
- March 2011 (11)
- February 2011 (11)
- January 2011 (13)
- December 2010 (9)
- November 2010 (30)
- October 2010 (7)
- September 2010 (11)
- August 2010 (8)
- July 2010 (15)
- June 2010 (3)
- May 2010 (4)
- April 2010 (13)
- March 2010 (12)
- February 2010 (15)
- January 2010 (6)
- December 2009 (15)
- November 2009 (31)
- October 2009 (22)
- September 2009 (12)
- August 2009 (10)
- July 2009 (10)
- June 2009 (8)
- May 2009 (12)
- April 2009 (6)
- March 2009 (3)
- February 2009 (5)
- January 2009 (1)
- December 2008 (1)
- November 2008 (2)
- October 2008 (3)
- September 2008 (1)
- August 2008 (3)
- July 2008 (1)
- May 2008 (2)
- April 2008 (3)
- March 2008 (1)
- January 2008 (2)
- December 2007 (5)
- November 2007 (4)





Your comparison isn’t really fair as Google Charts does support Unicode by UTF-8 (which is actually the default) and you can technically download the images.
As I understand, it URL escapes all the characters – this one doesn’t
(although I’ll be updating it to allow it).
While you can download Google’s images – it doesn’t have the correct contnet disposition to allow you to do it automatically.
Just started using this on (most) pages on http://www.westmidlandbirdclub.com/ – thank you.