Letzte Bearbeitung:
Function add_qrcode
Useage : {{{add_qrcode($string[,$size]);}}}
Example : {{{add_qrcode('http://cmsimple-jp.org',80);}}}
Ausgabe des definierten Textes als QR-Code in der festgelegten Größe.
{{{add_qrcode("https://lembach-cmsimple.de",160);}}} ⇒
Dateiname: ./plugins/simpleplugins_xh/simpleplugins_library/add_qrcode/index.php
<?php
/*****************************************************
* Category : CMSimple_XH
* Typ : CMSimple Plugin
* Package : simpleplugins_xh Edition KRL
*****************************************************
* Function name : add_qrcode
* File name : index.php
* Version : 0.1
* Build : 20240206
* Autor : Takashi Uchiyama <http://cmsimple-jp.org>
* Lizenz : GPLv3 or CC-by-SA https://creativecommons.org/licenses/by-sa/4.0/deed.de
* Function : Display the QR code
******************************************************
* Useage : {{{add_qrcode($string[,$size]);}}}
* Example : {{{add_qrcode('http://cmsimple-jp.org',80);}}}
******************************************************/
/*
* Prevent direct access.
*/
if (!defined('CMSIMPLE_XH_VERSION')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
function add_qrcode($url , $size = 80) {
return '<img src="https://chart.googleapis.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chl=' . $url . '&choe=UTF-8 " alt="QR Code"/>';
}
?>