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?
- Formatting my post
- Notepad++ - Add C++ compiler
- Install PHPMailer 5.2.4 and use smtp gmail
- Set up a child account and set screen time limit in Windows 8
- Wayback Machine - see archived versions of web pages across time
- phpexcel toggle expand and hide column in EXCEL and summary
- Install PHP ibm_db2 extension in Linux (redHat)
- PHP: add a download as pdf file button in report page
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