简体   繁体   中英

Server side QR-Code generator alternative for Google's API?

Is there a simple way to set up a PHP script to accept text using GET and return a QR_CODE? So the image will be accessed like <img src="script.php?text="ABCDEFG" />

The library at phpqrcode.sourceforge.net didn't work for me , and Google's API isn't a long-term solution.

A quicksearch learnes us the following: http://phpqrcode.sourceforge.net/

You could be using this:

Step 1 . download the phpqrcode library and put it in a folder on your server Step 2. Use the following script:

if (!isset($_GET['text'])) die('No text given');
include('../lib/full/qrlib.php');
include('config.php');

QRcode::png($_GET['text']);

Step 3. Save it and enjoy it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM