简体   繁体   English

服务器端QR代码生成器是否可以替代Google的API?

[英]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? 有没有简单的方法来设置PHP脚本以使用GET接受文本并返回QR_CODE? So the image will be accessed like <img src="script.php?text="ABCDEFG" /> 因此,将像<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. phpqrcode.sourceforge.net上的库对我不起作用 ,并且Google的API并不是长期解决方案。

A quicksearch learnes us the following: http://phpqrcode.sourceforge.net/ 快速搜索可了解以下内容: http ://phpqrcode.sourceforge.net/

You could be using this: 您可能正在使用此:

Step 1 . 第1步 。 download the phpqrcode library and put it in a folder on your server Step 2. Use the following script: 下载phpqrcode库,并将其放在服务器上的文件夹中。步骤2。使用以下脚本:

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! 第3步。保存并享受它!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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