Superior Web Solutions 905 532 9642
HOME CLIENTS SERVICES BLOG ABOUT US CONTACT US
Categories:
 Internet Marketing
 iPhone iPad Apps Development
 IT Humour
 IT Industry News
 Search Engines
 User Guides
 Web Development
Browse by tags
Search Blog:
RSS
Subscribe to our newsletter
Name*:
E-Mail*:
Recent Posts
Most Common Screen Resolutions in 2011
Make PHP CAPTCHA more secure
Updated Stats
What Googles New Search Security Measures Mean to You
GoDaddy Mod_Rewrite Problem
What is the default font size in Browsers?
June 30, 2010 - Generate QR Code with PHP Using Google API

 What is QR Code

QR Code is a matrix code (or two-dimensional bar code) created by Japanese corporation Denso-Wave in 1994. The "QR" is derived from "Quick Response", as the creator intended the code to allow its contents to be decoded at high speed.
 
Sample: (http://superiorwebsys.com is in this code)
 
 
How to Generate QR Code with PHP Using Google API
<?
$urlToEncode
="http://superiorwebsys.com";
generateQRwithGoogle($urlToEncode);
function 
generateQRwithGoogle($chl,$widhtHeight ='150',$EC_level='L',$margin='0') {
    
$url urlencode($url); 
    echo 
'<img src="http://chart.apis.google.com/chart?chs='.$widhtHeight.
'x'.$widhtHeight.'&cht=qr&chld='.$EC_level.'|'.$margin.
'&chl='.$chl.'" alt="QR code" widhtHeight="'.$size.
'" widhtHeight="'.$size.'"/>';
}
?>
 
 
What are the Benefits of QR Code
 
With QR code mobile users can access website with more details about something, or a promotion from anywhere.
Associated tags:  PHP, Google, QR Code, Google API, API
Comments:
Michael P wrote on August 8, 2011 at 12:18
Re: Muhammad Atiq That should be posible. Let me know if it worked well for you.
Artificial Colours Web Design wrote on August 2, 2011 at 05:21
NIce and simple, will have to give this a go.
Muhammad Atiq wrote on June 27, 2011 at 16:28
Hi i want to create a QR image, But i want that i will enter three URL to generate the QR Code image, means the three URL will generate one QR code image. As it possible? Regards! M Atiq
Michael P. wrote on June 27, 2011 at 12:36
What API do you have in mind?
The Click Whisperer wrote on June 17, 2011 at 21:36
The Google API has a problem in that you can`t get a version 1 QR code from 16 characters. It cuts off at 15. The chld argument isn`t followed exactly and there are problems with the margins. Overall I wouldn`t trust this API much. It`s better to do something like "PHP QR Code" that actually works correctly and will give you a 21x21 when its supposed to, instead of a harder to scan 25x25.
Michael P. wrote on June 1, 2011 at 12:17
You can field instructions on How to Save Image From Web with php here
Michael P. wrote on June 1, 2011 at 12:06
Thanks for the question, I will create another blog post explaining how you can save remote files to your server using CURL.
rgnelson wrote on June 1, 2011 at 11:20
I need to create custom qr codes. If I could save the image to a file I could loop through from mysql... How could I write the qr code to file?
Susannah wrote on May 31, 2011 at 09:38
I`m not esaily impressed. . . but that`s impressing me! :)
Michael wrote on March 24, 2011 at 10:18
Thanks David, I`ve updated the code, so it should not generate any warnings now.
David wrote on March 23, 2011 at 10:47
width, not width. $size has not been defined.
Add Comment:
Name*:
E-Mail: Website:
Your message*:
»
© 2000 - 2012 Superior Web Solutions Web design    Web development    Online marketing