Easy to use automatic QR code generator

custom_qr_code_generator

Love them or hate them, plenty of people around the world use QR codes on a daily basis. Since he thinks they’re pretty great, Hackaday reader [falldeaf] thought it would be cool to put together an automatic QR code generator to be used on web sites.

Inspired by the custom QR logo embedding work done by our own [Brian Benchoff], his dynamic QR code generator allows you to do the same thing, but with far less work. The code requires that you have PHP and the GD library installed on your server, but other than that his code does the rest.

All you need to do is call up the page and pass along a URL, optional caption text, optional image overlay (to add your logo to the center of the code), as well as an optional hash code for tracking traffic sources. The page spits out a png image that can be used on its own, or embedded in a blog, which is what [falldeaf] plans on using it for.

If QR codes are your thing, be sure to grab a copy of his code, it will certainly be a handy tool to have around.

Comments

  1. Neftaly Hernandez says:

    This would probably be better done in Javascript after the page had finished loading, as having to generate and download the image on the server for every page is a little wasteful. I’d also recommend hiding it using CSS unless media=print (which is the only time it actually needs to be shown – preferably absolute positioned at the top right corner of the printed pages).

  2. Jakob says:

    Great very easy to use..

  3. supershwa says:

    Cool that he did it, but it’s not new, however it appears [falldeaf] took it a step further with logos. http://qrcode.kaywa.com/ has a quick generator, and the project at SourceForge: http://phpqrcode.sourceforge.net/ has been around for a while too.

  4. sweet thanks!!

  5. Anonymous says:

    I can’t stand when people put their logos or whatever in QR codes and just rely on error correction like that. The fantastic error correction of QR codes is in place to make it easier to scan and more resistant to damage. Not to put a crappy pixel leaf in the center and leave a bunch of half pixels in it.

  6. N0LKK says:

    Not having a server,or renting server space I have no way of putting this effort by falldeaf to use. I suppose I could create a virtual sever on my computer, and experiment that way. Not having a smart phone to test resulting QR codes, I best leave them alone. Some people are developing unreasonable attitudes to QR codes. I have save the file, in the event I can put it to use later, thanks to falldeaf for mailing it available.

  7. tz says:

    Pehaps I should update my stand-alone HTML5 javascript version…

    http://code.google.com/p/jsqrencode/downloads/list

  8. BG says:

    Or you can take advantage of Google’s free chart API:

    https://chart.googleapis.com/chart?chs=150×150&cht=qr&chl=Hello%20world

  9. falldeaf says:

    Thanks for the compliments! And thanks Mike, for the nice write-up.

    @Anonymous: That’s true, it does actually degrade the error correction by putting a logo in it. But in this case, you’re taking a picture of your monitor with a phone from a distance of 1 foot. It should be pretty easy to get a good shot of it. In a situation where it’s harder, on a billboard for instance, where there may be obstructions between you and the target, your argument makes more sense. Thanks for reading anyway! :)

  10. falldeaf says:

    Just to clear a few things up:

    @BG: My code uses that API already.

    @Neftaly Hernandez: I’m not generating each image on the fly, it’s all getting cached. That’s my personal server setup, though. After a tip from someone on twitter though, I’m considering turning this into a wordpress plugin that does the caching in a more stand-alone fashion.

    Thanks again for reading!

  11. Aud says:

    There is a firm now that will print these in a scale to be read from space (bluemarblebrand.com) to be mounted on roofs.

  12. I think QR codes are cool and under used. I am not sure about this form of embedding images as I haven’t tried it yet but looks interesting.

    If you are creating multiple (more than 5 or 6) QR codes for people the online method is time consuming.
    I worked out a system to manage getting people to enter data (in a google form) and then convert that into QR codes using a bash shell script.
    I’m including it here as a point of interest even if it isn’t directly related to this post:

    http://david-halliday.co.uk/wiki/doku.php?id=linux:scripts:encode_qr_codes

  13. hey it works :-)
    great script…

  14. Giulia says:

    Hi, I need to make a double qr code, that is, a smaller QR code is embedded into the original QR code, for having a double information. I saw some of them on internet, but no one explains how to create them. Do you know anything about this?

  15. Superb post and additionally simple to make sure you figure out description. Exactly how can Document keep performing obtaining authorization to make sure you publish element for the document into my approaching e-newsletter?

  16. Sol says:

    Thanks on your marvelous posting! I truly enjoyed reading it,
    you’re a great author. I will make certain to bookmark
    your blog and may come back sometime soon. I want to encourage
    that you continue your great work, have a nice afternoon!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,661 other followers