I create files in PHP, and wanted to add a QRCode image of each file, to download it. The files are PDF and SVG.
I create files in PHP, and wanted to add a QRCode image of each file, to download it. The files are PDF and SVG.
PHP QR Code is an open source library (LGPL) for generating QR Code images.
Based on the library in libqrencode C, it provides an API to create QR code barcode images (PNG, JPEG thanks to GD2).
Implemented purely in PHP, with no external dependencies (except GD2 if necessary).
Example
include('qrlib.php');
// saída direta para o navegador da imagem com o QR Code na forma de PNG
QRcode::png('Dados aqui que pode ser o caminho completo para o ficheiro');
For the output to be applied on the page, you can use something like this:
// tag <img/> com caminho para o PHP que gera o QR Code
echo '<img src="qrcode_do_meu_ficheiro.php" />';
You can check out the numerous samples directly on the library website.