Files
web/scripts/pi-hole/php/api_token.php
DL6ER d104539708 API QR token generator (#410)
* Added API QR token generator

* Pass only token

* Corrected link
2017-02-27 22:33:35 +01:00

27 lines
371 B
PHP

<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>