Files
web/scripts/pi-hole/php/api_token.php
Florian Ströger 2c7b6c07c6 Added "Raw API Token:"
As requested
2018-04-29 10:17:10 +02:00

30 lines
423 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");
print("Raw API Token: ");
print($pwhash);
}
else
{
?><p>No password set<?php
}
}
else
{
?><p>Not authorized!</p><?php
}
?>
</body>
</html>