password - no echo, media - redirect

This commit is contained in:
bogale 2026-09-28 21:25:37 +09:00
commit 88d7cb4f69
5 changed files with 16 additions and 11 deletions

View file

@ -5,7 +5,9 @@ require "$root/templates/header.php";
$str = strtr(base64_encode(random_bytes(15)), '+/', '-_');
$str[random_int(0, 19)] = random_int(0, 1) ? '-' : '_';
echo "<div>$str</div>\n";
echo "<button onclick='navigator.clipboard.writeText(\"$str\").then(
() => { result.innerHTML = \"Copied\"; } );'>Copy</button><br>\n";
echo "<span id='result'></span>\n";
require "$root/templates/footer.php";
?>