Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- PHPWind-- A PHP forum script applcaition in China
- How to blend adsense inside your post?
- PHP: add a download as pdf file button in report page
- Formatting my post
- Notepad++ - Add C++ compiler
- PHP connect IBM db2 database in XAMPP
- Datatable export excel wraptext and newline
- phpexcel toggle expand and hide column in EXCEL and summary
- Sweet Alert JS library - beautiful replacement of JavaScript Alert
- ActionScript 3.0 demo: create a falling snow in flash CS6
Monday, June 24, 2013
PHP: QR code generator
QR code (Quick Response Code) is the trademark for a type of matrix barcode.
PHP QRcode library can be downloaded:
http://phpqrcode.sourceforge.net/index.php
To use Qrcode library is quite simple, you just need to include "qrlib.php";
QRcode::png('code data text', 'filename.png') to create output file
QRcode::png('code data text') output code image directly to browser.
Example, first create a post form and post it to qrcode.php
<html>
<h1>Jiansen Lu tools -Generate QR Codes</h1><br />
<form action="qrcode.php" method="post">
Input your text here:<br />
<textarea rows="5" cols="50" name="text1"></textarea><br />
<input type="submit" value="Create QR Code" />
<input type="reset" value="Reset" name="reset" />
</form>
</html>
In qrcode.php
<?php
include "qrlib.php";
//QRcode::png('code data text', 'filename.png'); // creates file
QRcode::png($_POST['text1']); // creates code image and outputs it directly into browser
?>
Or you can directly use index.php as an example, the demo is here:
http://swf.site40.net/phpqrcode/
Subscribe to:
Post Comments (Atom)
More pls!!! tnx
ReplyDelete