This repository has been archived on 2024-07-01. You can view files and clone it, but cannot push or open issues or pull requests.
php_qr_generator/generate_qr.php

23 lines
532 B
PHP
Raw Permalink Normal View History

2023-01-09 14:28:28 +01:00
<?php
/*
* Author: F. Bischof (info@meer-web.nl)
* Version: 1.0
*
* More info: https://developers.google.com/chart/infographics/docs/qr_codes
*/
function QR() {
$URL_ROOT = 'https://chart.googleapis.com/chart';
$TYPE = 'qr'; // QR
$SIZE = '250x250'; // Size QR
$ENCODING = 'UTF-8'; // Encoding
global $DATA; // Data
$URL_FULL = "<img src='${URL_ROOT}?cht=${TYPE}&chs=${SIZE}&chl=${DATA}&choe=${ENCODING}'>";
return $URL_FULL;
}
$DATA = 'Hi Mothergoose';
echo QR();
?>