11 lines
294 B
PHP
11 lines
294 B
PHP
<?php
|
|
$title = "Password generator";
|
|
$root = $_SERVER["DOCUMENT_ROOT"];
|
|
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";
|
|
|
|
require "$root/templates/footer.php";
|
|
?>
|