You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
721 B
26 lines
721 B
<?php
|
|
|
|
@include 'cgi-bin/params.inc';
|
|
|
|
$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR;
|
|
$PNG_WEB_DIR = 'temp/';
|
|
$SID = $BASE_URL.'/device/?sid='.$_GET['sid'];
|
|
|
|
include "qrcode/qrlib.php";
|
|
|
|
if (!file_exists($PNG_TEMP_DIR)){
|
|
mkdir($PNG_TEMP_DIR);
|
|
}
|
|
|
|
$filename = $PNG_TEMP_DIR.'COZe.png';
|
|
$errorCorrectionLevel = 'L';
|
|
|
|
$matrixPointSize = 20;
|
|
|
|
$filename = $PNG_TEMP_DIR.'test'.md5($SID.'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png';
|
|
QRcode::png($SID, $filename, $errorCorrectionLevel, $matrixPointSize, 2);
|
|
|
|
|
|
echo '<center><img src="'.$PNG_WEB_DIR.basename($filename).'" style="height: calc(100vh - 40px);"></center>';
|
|
|
|
?>
|