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
/*****************************************************
* Plugin name : add_qrcode
* File name : index.php
* Summery ; Display the QR code
* Version : 0.1
* Auther : Takashi Uchiyama <http://cmsimple-jp.org>
* License : GPLv3.
*****************************************************
* 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"/>';
}
?>