<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Introducing a NEW QR Generator &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sun, 23 Feb 2025 09:47:59 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>Introducing a NEW QR Generator &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Introducing a NEW QR Generator]]></title>
		<link>https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/</link>
					<comments>https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 23 Feb 2012 12:00:20 +0000</pubDate>
				<category><![CDATA[qr]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[QR Codes]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=5369</guid>

					<description><![CDATA[When people ask me which QR generator to use, I usually suggest Google Charts.  However, recently I&#039;ve become dissatisfied with its limitations, so I&#039;ve decided to write and release my own QR encoder.  I&#039;m still looking for a catchy name for it (suggestions welcomed) - so for now it&#039;s called &#34;QR Generator PHP&#34;.  It&#039;s available on GitHub or you can use it directly.  So, how does it compare to…]]></description>
										<content:encoded><![CDATA[<p>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.</p>

<p>I'm still looking for a catchy name for it (suggestions welcomed) - so for now it's called "QR Generator PHP".</p>

<p>It's <a href="https://github.com/edent/QR-Generator-PHP">available on GitHub</a> or you can <a href="https://shkspr.mobi/qr/">use it directly</a>.</p>

<p>So, how does it compare to Google Charts?</p>

<table>
<tbody><tr><th>Feature</th><th>New QR Encoder</th><th>Google Charts</th></tr>
<tr><td>Image Formats</td><td>PNG, JPG, GIF</td><td>PNG</td></tr>
<tr><td>Maximum Image Size</td><td>1480*1480px</td><td>547*547px</td></tr>
<tr><td>Unicode Support</td><td>Yes</td><td>No</td></tr>
<tr><td>Downloadable Images</td><td>Yes - to a specific filename</td><td>No</td></tr>
<tr><td>Open Source</td><td>Yes</td><td>No</td></tr>
<tr><td>Run on your own webserver?</td><td>Yes</td><td>No</td></tr>
</tbody></table>

<h2 id="usage"><a href="https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/#usage">Usage</a></h2>

<p>Usage is really simple.</p>

<p>To generate a QR code which says "hello":
<a href="https://shkspr.mobi/qr/php/qr.php?d=hello">qr.php?d=hello</a>
(Click to see the QR code)</p>

<p>You can set the size with, oddly enough, the size parameter:
<a href="https://shkspr.mobi/qr/php/qr.php?d=hello&amp;size=1000">qr.php?d=hello&amp;size=1000</a>
Size can be up to 1480 pixels.</p>

<p>You can set the image format to JPG or GIF.  By default it outputs PNG.
<a href="https://shkspr.mobi/qr/php/qr.php?d=hello&amp;t=J">qr.php?d=hello&amp;t=J</a></p>

<p>The Error Correction can be set to L, M, Q, or H.
<a href="https://shkspr.mobi/qr/php/qr.php?d=hello&amp;e=H">qr.php?d=hello&amp;e=H</a></p>

<p>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.
<a href="https://shkspr.mobi/qr/php/qr.php?d=hello&amp;t=g&amp;download=testing">qr.php?d=hello&amp;t=g&amp;download=testing</a>
The file will be called testing.gif (filetype is determined automatically)</p>

<h2 id="installation-and-configuration"><a href="https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/#installation-and-configuration">Installation and configuration</a></h2>

<p>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.</p>

<p>There are three folders.</p>

<pre> |_php
 |_data
 |_image
</pre>

<p><strong>DO NOT TOUCH THE CONTENTS OF THE data AND image FOLDERS</strong>.</p>

<p>Inside the php folder, you'll find the "qr.php" file.</p>

<p>There are only two things you need to configure - the location of the data and image folders</p>

<pre lang="php">$path = "./../data"; // You must set path to data files.
$image_path = "./../image"; // You must set path to QRcode frame images.
</pre>

<p>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.</p>

<h2 id="copyright"><a href="https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/#copyright">Copyright</a></h2>

<p>I've based my QR generator on that of <a href="https://www.swetake.com/qrcode/index-e.html">Swetake</a>.  The original was licensed as "revised BSD" - I have kept the original licence.</p>

<h2 id="feedback"><a href="https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/#feedback">Feedback</a></h2>

<p>If you've got any feedback - either leave it in the comments here, or <a href="https://github.com/edent/QR-Generator-PHP">over at GitHub</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=5369&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/02/introducing-a-new-qr-generator/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
