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.
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).
Great very easy to use..
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.
sweet thanks!!
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.
“put[ting] a crappy pixel leaf in the center and leave a bunch of half pixels in it.” is pretty much the epitome of a hack. And this is Hack a Day.
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.
Pehaps I should update my stand-alone HTML5 javascript version…
http://code.google.com/p/jsqrencode/downloads/list
Or you can take advantage of Google’s free chart API:
https://chart.googleapis.com/chart?chs=150×150&cht=qr&chl=Hello%20world
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! :)
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!
There is a firm now that will print these in a scale to be read from space (bluemarblebrand.com) to be mounted on roofs.
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
hey it works :-)
great script…
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?
I can’t tell if this is a joke or not XD I googled for that and it looks like they’re just inserting one code into another.
http://www.engadget.com/2008/02/19/firm-proposes-double-qr-code-we-say-why-stop-there/
You could use my script and pass a qr code image as the embed image, I guess. Or it wouldn’t be too hard to modify my script to automate the second code as well.
thanks, I’ll try to use your script!!!
Dunno if you’re still around, but I was able to create this one:
http://designerqrcodes.files.wordpress.com/2011/08/qrinqr.png
It embeds the smaller QR code into the padding of the larger code, so you can use a larger inside image and not worry about error correction damage.
You can try your own at http://www.qrpixel.com
Kevin
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?
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!