The simplest and most examples of Goolge open source methods
1.google Open API
Cases
| The code is as follows |
Copy Code |
|
$urlToEncode = "http://gz.altmi.com";
Generateqrfromgoogle ($urlToEncode);
function Generateqrfromgoogle ($chl, $widhtHeight = ' _level= ', $EC ' L ', $margin = ' 0 ')
{
$url = UrlEncode ($url);
Echo '
Chs= '. $widhtHeight. ' x '. $widhtHeight. ' &cht=qr&chld= '. $EC _level. ' | ' $margin. ' &chl= '. $chl. ' "alt=" QR Code "
Widhtheight= "'. $size. '" widhtheight= "'. $size. '" /> ';
} |
The above method is simple and fast, as long as a few words can be, the deficiency is called Google server things, if Google does not provide services we can not
Here we go, look at it.
2.php class library PHP QR Code
Address: http://phpqrcode.sourceforge.net/
Download: http://sourceforge.net/projects/phpqrcode/
Cases
| code is as follows |
copy code |
|
<?php
include ('./phpqrcode/phpqrcode.php ');
//Two D code data
$data = ' http://gz.altmi.com ';
//generated filename
$filename = $errorCorrectionLevel. ' | '. $matrixPointSize. ' PNG ';
//Error correction level: L, M, Q, H
$errorCorrectionLevel = ' l ';
//Point size: 1 to ten
$matrixPointSize = 4;
qrcode::p ng ($data, $filename, $errorCorrectionLevel, $ Matrixpointsize, 2);
? |
This is pretty good. Save in your own server, and now there are some such as: Libqrencode and QRCode Perl CGI & PHP Scripts Two-dimensional code generation plugin large
Home like also can see.