
Before you QR code (“Quick Response”) - this is a new generation of bar codes developed by the Japanese company Denso-Wave back in 1994, in order to replace the standard barcode, which could no longer satisfy all needs. At the moment, it is widely used in Japan and other Asian countries, and comes to us a little bit - at least take a look at the processor in your computer - it, too, is most likely marked with a 2D code.
Before the usual barcode, QR has a couple of significant advantages:
- The volume of stored information (up to 4,296 characters, or up to 7,089 digits)
- Error correction support (from 7% to 30% of information) - Reed-Solomon code is used
A QR code has versions, they differ in the amount of stored information and of course in size:
- Version 1 contains: 21 lines and columns, maximum 25 characters
- Version 2 contains: 25 lines and columns, maximum 47 characters
- ...
- Version 40 contains: 177 lines and columns, maximum 4,296 characters
More detailed information can be found on the pages of
Wikipedia (English), or even
Habr')
You can use the following services to generate a picture with a QR code:
One of the advantages of this code - it can be easily recognized using your mobile phone - just install the appropriate software:
Note : When generating the code, do not use the version above the fourth, because there is a large share of probability - that this will not be recognized by mobile phones.
For developers, "readers" - here is a link to the
ZXing library for Java.
I also advise you to look at the site
http://www.semapedia.org/ - they are now actively involved in the promotion of QR code ...
Further information for bloggers - if you want to diversify your blog - you can add a QR code to each post using one of the following methods:
QR Code plugin for Wordpress
Download:
QR Code (version 0.1)
The plugin uses the
QR-code library to generate an Open Source image (the images are added to the plugin directory).
To install you will need:
- Unpack the archive with the plugin in the directory / wp-content / plugins /
- Set write permissions for the / wp-content / plugins / a-qr-code / cache / directory
- Activate the plugin in the admin panel
And edit the topic a bit by adding the following code to the page.php, single.php, archive.php, index.php files (it is not necessary for you to choose everything):
<? php if (function_exists ('aQRCode')) {echo '<img src = "'. aQRCode (get_permalink ()). '" alt = "QR Code for' .the_title ('', '', false). '"/>'; }?>
This will add a QR code to the post (or page) in which the URL of the page will be encrypted.
The aQRCode function can take the following parameters:
- Data for encoding (string) - in the example, the string returned by the get_permalink () function was used
- The amount of data for the correction (string) - L (7%), M (15%), Q (25%) or H (30%)
- Format (string) - J - for jpeg and other - for PNG
- Size (integer) - up to 1480
- Version (integer) - from 1 to 40
QR Code plugin for Wordpress (Google Charts API version)
Download:
QR Code (GCAPI) (version 0.1)
This method is based on the
Google Charts API , and is very easy to install:
- Unpack the archive with the plugin in the directory / wp-content / plugins /
- Activate the plugin in the admin panel
Add the following code to the theme template:
<? php if (function_exists ('aQRCodeG')) {echo '<img src = "'. aQRCodeG (get_permalink ()). '" alt = "QR Code for' .the_title ('', '', false). '"/>'; }?>
The aQRCodeG function can take the following parameters:
- Data for encoding (string) - in the example, the string returned by the get_permalink () function was used
- Size (integer) - up to 546 pixels
- Encoding (string) - Shift_JIS, UTF-8 or ISO-8859-1
- The amount of data for the correction (string) - L (7%), M (15%), Q (25%) or H (30%)
- Indent (integer) - default 4 columns / lines
QR Code for Blogspot
Using this method, you can easily integrate the QR code into your blog on blogspot.com or on any other hosting, where you have the opportunity to insert the following JavaScript code into a page (this method is also based on the Google Charts API):
// use current location as data
var chl = new String (document.location);
pos = chl.indexOf ('#', 0);
if (pos> = 0) {
chl = chl.substr (0, pos);
}
chl = escape (chl); // escaped data
var chs = '150x150'; // Size: The largest area for all charts except maps is 300,000 pixels. As many as 1000x300, 300x1000, 600x500, 500x600, 800x375, and 375x800.
var choe = 'UTF-8'; // Charset: Shift_JIS, UTF-8, or ISO-8859-1
var chld = 'L'; // L allows 7% of a QR code to be restored, M allows 15%, Q allows 25%, H allows 30%
var margin = 4; // margin in rows / columns
document.write (unescape ('% 3Cimg src = "http://chart.apis.google.com/chart?chs='+chs+'&cht=qr&chl='+chl+'&choe='+choe+'&chld='+ chld + '|' + margin + '"alt =" QR Code "/% 3E'));
For blogspot.com you need to add a
gadget called
HTML / JavaScript , how it looks you can look at the blog
php-team.blogspot.com