QRifier.com

Fast and convenient QR-code & QR-avatar generator

API

Main part

In order to get the QR-code from QRifier.com just need to make a simple request to the system.
The request must begin with:

http://qrifier.com/q?


Parameters

Request contains six parameters: code type, code size, result type, fcolor, bcolor and a string that you want to encode.
Parameters are placed in any order. string must be urlencoded. You can use URLencoder at the bottom pf this page.
All parameters except string are optional.

Example: http://qrifier.com/q?inc=qr&type=url&size=120&string=http://google.com


Code type (as inc)

Now code type can have two values: qr and pdf.
qr means that PNG-image will be generated as a result, and pdf, respectively, means that PDF-document will be generated


Color (as fcolor and bcolor)

Color paramater works now with qr code type only.

You can add foreground and background colors in hex format if you want to change the code and background color

Example: http://qrifier.com/q?inc=qr&type=url&size=120&fcolor=00ff00&bcolor=ffffff&string=http://google.com


Code size (as size)

Code size can be any integer value. Note that too small picture may be incorrectly recognized


Result type (as type)

The system currently supports 12 result types: url, trk, tre, biz, eml, tel, sms, txt, geo, med, cal and 4sq.

Type means that the string will contain a website address.

Example: http://qrifier.com/q?type=url&inc=qr&size=80&string=http://google.com


Website address should begin with http://


For registered users only! Type means that the string will contain a website address with tracking support.
tre type means extended tracking functionality and redirect will contain URL query string with customer data. Read more

Example: http://qrifier.com/q?type=trk&inc=qr&size=80&string=http://google.com&auth=YOUR_AUTH_TOKEN
or
http://qrifier.com/q?type=tre&inc=qr&size=120&string=http://google.com&auth=YOUR_AUTH_TOKEN


Do not use as <IMG> tag source because your token will be visible in the page source!
Instead, you can use PHP script for generating code on the server side - see Usage

Website address should begin with http://
YOUR_AUTH_TOKEN and scan statistics you can find on your account page
Tracking database record created automatically for every url with trk and tre result type after QR-code generated.


Type means that the string will contain a business card info in the following format:
N:LASTNAME, FIRSTNAME;TEL:PHONE_NUMBER_WITH_COUNTRY_CODE;ADR:ADDRESS;EMAIL:E-MAIL_ADDRESS;URL:http://YOUR_URL

Example: http://qrifier.com/q?type=biz&size=200&inc=qr&string=N:Holmes, Sherlock;TEL:+1234567890;ADR:221B Baker Street, London, UK;EMAIL:holmes@ScotlandYard.co.uk;URL:http://ScotlandYard.co.uk/~holmes


Website address should begin with http:// , phone number should begin with "+" sign and country code


Type means that the string will contain e-mail address.

Example: http://qrifier.com/q?type=eml&size=80&inc=qr&string=holmes@ScotlandYard.co.uk


Type means that the string will contain phone number.

Example: http://qrifier.com/q?type=tel&size=150*inc=qr&string=+1234567890


Phone number should begin with "+" sign and country code


Type means that the string will contain phone number and sms message in the following format: PHONE_NUMBER_WITH_COUNTRY_CODE:MESSAGE

Example: http://qrifier.com/q?type=sms&size=90&inc=qr&string=+1234567890:Call me


Message along with colon (:) is optional. Phone number should begin with "+" sign and country code


Type means that the string will contain simple text.

Example: http://qrifier.com/q?type=txt&size=200&inc=qr&string=The quick brown fox jumps over the lazy dog


Type means that the string will contain geographical coordinates (latitude and longitude)

Example: http://qrifier.com/q?type=geo&size=70&inc=qr&string=40.71435,-74.00597


The order is important: first the latitude and longitude after the comma


Type means that the string will contain personal medical info (Medical ID) in following format:
NAME:LASTNAME,FIRSTNAME;BD:BIRTH_DATE;GEN:GENDER:ADR:ADDRESS;
KIN:NEAREST_KIN_NAME;KIN.TEL:KIN_PHONE_NUMBER_WITH_COUNTRY_CODE;
BLD:BLOOD_TYPE(A/B/AB/O)_AND_RH_FACTOR(+/-);ALLERG:KNOWN_ALLERGIES;
DIABETES;MORE:ADDITIONAL_INFO

Example: http://qrifier.com/q?type=med&size=150&inc=qr&string=NAME:Holmes,Sherlock;BD:21JUL1854;GEN:M:ADR:221B Baker Street, London, UK;KIN:Mycroft Holmes, brother;KIN.TEL:+44235876353;BLD:AB+;ALLERG:cat fur;MORE:having a "cat-like" love of personal hygiene


Code size mandatory and can be of any value but it changes automatically to 200px because of large volume of data.


Type means that the string will contain calendar event in following iCal format:

SUMMARY:EVENT_NAME\r\nDTSTART:YYYYMMDDTHHMM00Z\r\n DTEND:YYYYMMDDTHHMM00Z\r\nLOCATION:OPTIONAL_LOCATION\r\nDESCRIPTION:OPTIONAL_DESCRIPTION

DTSTART (event start date and time) and DTEND (event end date and time) format is four digit year, two digint month, two digit day, T symbol, two digit hour in 24h format, two digit minutes and 00Z symbols (20100910T130300Z)

If DTSTART and DTEND set without time (just 20100910) event will be recognized by calendar software as "fullday" event.

Example: http://qrifier.com/q?type=cal&size=200&inc=qr&string=SUMMARY:party\r\nDTSTART:20100911T203000Z\r\n DTEND:20100911T230000Z\r\nLOCATIONjack's appt\r\nDESCRIPTION:buy some beer

CRLF (as \r\n) between parameters is mandatory. You can manually change it to %0D%0A (urlencoded CRLF). No spaces allowed between parameters.


Type means that the string will Foursquare venue ID.

Example: http://qrifier.com/q?type=4sq&size=200&inc=qr&string=123456



PDF

Few examples of PDF type usage:

http://qrifier.com/q?type=trk&inc=pdf&string=http://google.com
http://qrifier.com/q?type=geo&inc=pdf&string=40.71435,-74.00597
http://qrifier.com/q?type=txt&inc=pdf&string=The quick brown fox jumps over the lazy dog
http://qrifier.com/q?type=med&inc=pdf&string=NAME:Holmes,Sherlock;BD:21JUL1854;GEN:M:ADR:221B Baker Street, London, UK;KIN:Mycroft Holmes, brother;KIN.TEL:+44235876353;BLD:AB+;ALLERG:cat fur;MORE:having a "cat-like" love of personal hygiene


QR-codes in the PDF document may have a different pattern but they contain the same data.
Code size can be any value but will be cut off automaticaly bacause of predefined PDF-document layout.


Usage

IMAGE

To display the QR code on the site you need to add QRifier generation string as source of IMAGE tag.
Code type must be set to qr. Do not forget urlencode your string. You can use URLencoder at the bottom pf this page

<img src="http://qrifier.com/q?type=trk&inc=qr&size=80&string=http%3A//google.com" alt="my qr code">


PHP

function LoadQR($string, $rtype, $size=120, $auth='')
{
        $host = "http://qrifier.com/q?inc=qr";
        if(!empty($auth)) $auth_string = "&auth=".$auth;
        $qrifier = $host."&type=".$rtype."&size=".$size."&string=".urlencode($string).$auth_string;
        $im = @imagecreatefrompng($qrifier); // Attempt to open
        if(!$im) // See if it failed
        {
                 // Create a blank image
                 $im  = imagecreatetruecolor(150, 30);
                 $bgc = imagecolorallocate($im, 255, 255, 255);
                 $tc  = imagecolorallocate($im, 0, 0, 0);
                 imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
                 imagestring($im, 1, 5, 5, 'Error loading' . $imgname, $tc); // Output an error message
        }
        return $im;
}

header('Content-Type: image/png');
$img =  LoadQR('http://google.com','url',80);
imagepng($img);
imagedestroy($img);


URLencode helper

Past your string into textarea and press URLencode button to make string encoded.