The use of two-dimensional code I will not say, look at the two-dimensional code generated by PHP bar.
Using Google's API to generate QR codes, many foreign sites now offer such APIs
Look at the code. "======================="
The above method is particularly simple, but if the site does not provide this API, we do not want to break the food? Let's use our PHP class library.
PHP class library PHP QR Code
Address: http://phpqrcode.sourceforge.net/
Download: http://sourceforge.net/projects/phpqrcode/
Instance:
!--? php include ('./phpqrcode/phpqrcode.php '); Two-dimensional code data $data = ' http://gz.altmi.com '; The generated file name $filename = $errorCorrectionLevel. ' | '. $matrixPointSize. " PNG '; Error correction level: L, M, Q, H $errorCorrectionLevel = ' L '; The size of the point: 1 to $matrixPointSize = 4; QRCode::p ng ($data, $filename, $errorCorrectionLevel, $matrixPointSize, 2);?-->
official given use case:!--? php# include one of two files:/*qrlib.php for full version (also All libraries files Form package plus cache dir) OR phpqrcode.php for merged version (only one file, but slower and less ACC Urate code because disabled Cacheand quicker masking configured) */# two sentences explained: # contains qrlib.php words need to be put together with other files: files, folders. # phpqrcode.php is a merged version that only needs to contain this file, but the resulting picture is slow and inaccurate # Here are two ways to use: # Create a QR code file QRCode::p ng (' Code data text ', ' filename.png '); /creates file# generate image to browser QRCode::p ng (' some othertext 1234 ');//creates code image and outputs it directly into Browser
hehe. You can try it yourself. Delmar on a single, not to send Oh.