user2216190
user2216190

Reputation: 834

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.

Upvotes: 0

Views: 2023

Answers (1)

Benjamin de Bos
Benjamin de Bos

Reputation: 4346

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!

Upvotes: 1

Related Questions