“New Easy QrCode Generator Class (PHP) ” Documentation by “Krzysztof Zajac” v3.0


New Easy QrCode Generator Class (PHP)

Created: 01/09/2011
By: Krzysztof Zajac
Email: cristoforo.zajac@gmail.com

Thank you for purchasing this item. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!


Table of Contents

  1. Short presentation
  2. Installation
  3. Basic Methods
  4. New Methods
  5. Properties
  6. TIPS & TRICKS

A) Short presentation - top

Qr Code is type of Barcode that you use on your website. This type of barcode you can read by mobile phones like iphone or all with Android system
(youtube link with example of use : http://www.youtube.com/watch?v=IphTJHiKGos&feature=related ). Inside you can insert some information like link ,text, email address, phone number ,contact information and more ,this message we read by your phone. Normally you to create this you can use google chart but the syntax use terrible this class create link for you in easy way you pass only some information and you get correct link for google chart

This class is :
- Useful for any PHP website
- Cross-browser compatible
- simple to use (2 line of code)
- detailed documentation included
- PHP examples file included (demo folder)
- You can create 10 Basic QrCodes and 28 New QrCode
-Use Google Api to create QrCode link

How to install - top

To install this class you must copy "qrcode.php" file to your root directory on your server.
Select your file where you want create qrcode and include this file by using : include("qrcode.php"); code

Now you can recall class. I present you how to do it in explanation of any of method

Basic Methods - top


Basic methods are :

Text to Qrcode - top

Change clean text to Qrcode. Method accept one parameter (text).

Email to Qrcode - top

Want create default email message in qrcode that user can send ? Method accept 3 parameters: GetMail(email_address, mail_subject, message)
All parameters are string. If you don't want use one of parameter you must pass null string by using ""


Geo Location to Qrcode - top

This method you can use to pass geo location coordinates.
Important Qrcode want open Google Maps App on smartphone if you don't have code don't work
Method accept 2 parameters: GetGeo(your_latitude,your_longitude)
All parameters are string.


SMS to Qrcode - top

Method that create Qrcode with phone number and sms default message
Method accept 2 parameters: GetSms(phone_number,sms_message)
All parameters are string.
Important that you insert number with country code prefix like +39 ( Italy ) without +


MMS to Qrcode - top

Like SMS buy you use GetMms method.

Phone number to Qrcode - top

Method that create Qrcode with phone number
Method accept one parameter: GetPhone(phone_number)
Parameter is string.
Important that you insert number with country code prefix like +39 ( Italy ) without +


URL Bookmark to Qrcode - top

This method create qrcode with bookmark link to your web page
With new version of Android (3.0) is opening only web page but wit older is work fine
Method accept 2 parameters: GetBookmark(your_url,your_description)
All parameters are string.


Contact (meCard) to Qrcode - top

Method insert all contact info in qrcode and in easy way users can add contact in smartphone
Scanners have some problem with address and i deleted this option form method if you wand add address insert it as note
Method accept 4 parameters: GetContact(name, phone,url,emailContact ,note )
Important that you insert number with country code prefix like +39 ( Italy ) without +
All parameters are string.


Contact (vCard) to Qrcode - top

Method insert all contact info in qrcode and in easy way users can add contact in smartphone
Scanners have some problem with address and i deleted this option form method if you wand add address insert it as note
Method accept 8 parameters: GetVcard( Name,company,Job_title,Work_tel,home_tel,email,site_url,note);
Important that you insert number with country code prefix like +39 ( Italy ) without +
All parameters are string.


WiFi to Qrcode - top

Want in easy way configure your smartphone to use your wifi network create qrcode.
In this qrcode you can pass password, network name and type of encryption
Work only with Android
Method accept 3 parameters: GetWiFi( network_sid,password, type_of_encryption);
You have 3 type of encryption

0-WEP
1-WPA
2-nopass



New Methods (26) - top


I created 26 new methods that can we very helpful for you. I write small description of them but if you want view code
go to example folder and view files:
"example-Paypal, gplus, youtube"
"example-Facebook,Twitter,Envato"
"example-Alexa Info, Whois Info,Compete Info,Quantcast Info,Histats Info"

Paypal buttons link to Qrcode - top

Method create link to Paypal buy page from buttons .Works with all type of Paypal buttons: donation , buy now. Us one parameter (id of Paypal button) as text
Recall -> echo $myclass->Paypal("myButtonID");

Youtube Channel link to Qrcode - top

Create qrcode with link to your youtube channel.
Us one parameter (your youtube user name) as text
Recall -> echo $myClass->YoutubeChannel("youtubeUserName");

Youtube Video link to Qrcode - top

Create qrcode with link to your youtube channel.
Us one parameter (youtube video id in youtube link after v=) as text
Recall -> echo $myClass->YoutubeVideo("youtubevideoID");

gplus user profile link to Qrcode - top

Create qrcode with link to your google plus profile.
Us one parameter as text
Go to your gplus profile click on your profile photo from link url copy number
Recall -> echo $myClass->GplusUser("yourGplusNumberID");

gplus about link to Qrcode - top

As gplus user profile link to Qrcode
but you recall GplusAbout() method
Recall -> echo $myClass->GplusAbout("yourGplusNumberID");

gplus photos link to Qrcode - top

As gplus user profile link to Qrcode
but you recall GplusPhotos() method
Recall -> echo $myClass->GplusPhotos("yourGplusNumberID");

gplus video link to Qrcode - top

As gplus user profile link to Qrcode
but you recall GplusVideo() method
Recall -> echo $myClass->GplusVideo("yourGplusNumberID");

gplus buzz link to Qrcode - top

As gplus user profile link to Qrcode
but you recall GplusBuzz() method
Recall -> echo $myClass->GplusBuzz("yourGplusNumberID");

Facebook Profile Info link to Qrcode - top

Create qrcode with link to your facebook profile.
Us one parameter as text
Past your facebook user name
Recall -> echo $myClass->FacebookInfo("MyuserName");

Twitter Info link to Qrcode - top

Twitter: this create easy way link to your twitter profile ,following by you,followers of your profile, your favorites
Past 2 parameters : your user name and type of link:
1- profile
2-following by you
3-followers of your profile
4-your favorites
Recall -> echo $myClass->TwitterInfo("yourUserName",3);

Envato Markets-User Profile - top

All Envato methods as second parameters use number . Number (1-8) you use to select one of envato market

List of values = markets:
1-activeden.net
2-themeforest.net
3-videohive.net
4-graphicriver.net
5-3docean.net
6-codecanyon.net
7-marketplace.tutsplus.com
8-photodune.net

Envato User link to Qrcode - top

Create qrcode with link to your envato market profile.
Us 2 parameters as text: EnvatoUser("userName",number_of_selected_market)
Recall -> echo $myClass->EnvatoUser("userName",5);

Envato User Edit link to Qrcode - top

Create qrcode with link to edit your envato market profile.
As Envato User link to Qrcode
but you recall EnvatoEdit() method
Recall -> echo $myClass->EnvatoEdit("userName",5);

Envato User Downloads link to Qrcode - top

Create qrcode with link to download item by you.
As Envato User link to Qrcode
but you recall EnvatoDownloads() method
Recall -> echo $myClass->EnvatoDownloads("userName",5);

Envato User link History - top

Create qrcode with link to your History in market.
As Envato User link to Qrcode
but you recall EnvatoHistory() method
Recall -> echo $myClass->EnvatoHistory("userName",5);

Envato User link Withdrawal - top

Create qrcode with link to Withdrawal in market.
As Envato User link to Qrcode
but you recall EnvatoWithdrawal() method
Recall -> echo $myClass->EnvatoWithdrawal("userName",5);

Envato User link Earnings - top

Create qrcode with link to your Earnings in market.
As Envato User link to Qrcode
but you recall EnvatoEarnings() method
Recall -> echo $myClass->EnvatoEarnings("userName",5);

Envato User link Statement - top

Create qrcode with link to Statement in market.
As Envato User link to Qrcode
but you recall EnvatoStatement() method
Recall -> echo $myClass->EnvatoStatement("userName",5);

Envato Markets-Items - top

All Envato methods as second parameters use number . Number (1-8) you use to select one of envato market

List of values = markets:
1-activeden.net
2-themeforest.net
3-videohive.net
4-graphicriver.net
5-3docean.net
6-codecanyon.net
7-marketplace.tutsplus.com
8-photodune.net

Envato Item Page link - top

Create qrcode with link to your item on envato market.
Us 3 parameters as text: EnvatoItem("userName",number_of_selected_market,id__your_item)
Id of your Item is inside envato link to it ( number )
Example: id of this component ("http://codecanyon.net/item/flexi-pagination-class-9-css-beautiful-styles/239391") is 239391
Recall -> echo $myClass->EnvatoItem("zajcman",6,239391);

Envato Item Faq Page link - top

Create qrcode with link to FAQ page of your item.
As Envato Item Page link
but you recall EnvatoItemFaq() method
Recall -> echo $myClass->EnvatoItemFaq("zajcman",6,239391);

Envato Item Comments Page link - top

Create qrcode with link to FAQ page of your item.
As Envato Item Page link
but you recall EnvatoItemComments() method
Recall -> echo $myClass->EnvatoItemComments("zajcman",6,239391);

Envato Item Edit Page link - top

Create qrcode with link to FAQ page of your item.
As Envato Item Page link
but you recall EnvatoItemEdit() method
Recall -> echo $myClass->EnvatoItemEdit("zajcman",6,239391);

Alexa Info link - top

Using this you can create link to your alexa info page
A method you must past only name of your domain like : yourdomain.com
Recall -> echo $myClass->AlexaInfo("yourdomain.com");

Whois Info link - top

Using this you can create link to your alexa info page
A method you must past only name of your domain like : yourdomain.com
Recall -> echo $myClass->WhoisInfo("yourdomain.com");

Compete Info link - top

Using this you can create link to your alexa info page
A method you must past only name of your domain like : yourdomain.com
Recall -> echo $myClass->CompeteInfo("yourdomain.com")

Quantcast Info link - top

Using this you can create link to your alexa info page
A method you must past only name of your domain like : yourdomain.com
Recall -> echo $myClass->QuantcastInfo("yourdomain.com");

Histats Info link - top

Using this you can create link to your Histats info page. Past ID of your site in Histats ( in hitstats link)
Recall -> echo $myClass->HistatsInfo("123322");

Properties

Class have got some basic properties. This properties are very helpful. You can change it after recall the class but before recall of the selected method
Properties available :


if you want view code go to example folder and view file: "example-Change Propertys, size, background, margin and more"

Text Encoding - top

This properties is used to change encoding of text by default encoding is UTF-8.
A property you must past number
0 -UTF-8
1 -Shift_JIS
2 -ISO-8859-1
To change property you must do if after creation of php object but before recall of method ( see example file)

Image Size - top

This properties is used to change size of image that is created by google chart by default size of image is 150px
A property you must past number
To change property you must do if after creation of php object but before recall of method ( see example file)

Text or Image - top

This properties is used to change return link type by class by default class return html tag that you can insert in easy way to your web page
You can change it to html image tag by changing "IsImage" property.
A property you must past number
0 - create text link
1 - create html image tag with link
To change property you must do if after creation of php object but before recall of method ( see example file)

Margin Size - top

This properties is used to change size of white margin in google image A property you must past number
Best effect you get by using number 0-4
To change property you must do if after creation of php object but before recall of method ( see example file)

Correction Level - top

This properties is used to change correction error level
Property accept:"S","L","M","Q","H"
To change property you must do if after creation of php object but before recall of method ( see example file)

Transparency Level - top

Change transparency of google image
Property accept:0,20,40,60,80,100
To change property you must do if after creation of php object but before recall of method ( see example file)

Margin Background color - top

If you want change margin background color use this property
To change property you must do if after creation of php object but before recall of method ( see example file)

Tipc & Tricks - top

Some tips and tricks :)