API QR token generator (#410)

* Added API QR token generator

* Pass only token

* Corrected link
This commit is contained in:
DL6ER
2017-02-27 22:33:35 +01:00
committed by GitHub
parent 276f2c1628
commit d104539708
4 changed files with 1587 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<html><body>
<?php
require "auth.php";
require "password.php";
check_cors();
if($auth)
{
if(strlen($pwhash) > 0)
{
require_once("../../vendor/qrcode.php");
$qr = QRCode::getMinimumQRCode($pwhash, QR_ERROR_CORRECT_LEVEL_Q);
$qr->printHTML("10px");
}
else
{
?><p>No password set<?php
}
}
else
{
?><p>Not authorized!</p><?php
}
?>
</body>
</html>