added own random file

This commit is contained in:
vincent 2025-04-18 09:09:10 +02:00
parent e887951cee
commit 61e9819053
2 changed files with 22 additions and 1 deletions

View file

@ -1,5 +1,5 @@
<div>
<h1>LOGIN</h1>
<h1>Auth LOGIN</h1>
<form class="w3-form" action="login.php" method="post">
<label for="uid">Benutzer Id oder E-Mail:</label><br>
<input type="text" id="uid" name="uid" required><br>

21
random.php Normal file
View file

@ -0,0 +1,21 @@
<?php
/*
* smzint/Auth (c) schmamazon.com 2025
*/
function generateRandomString($length = 32) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[random_int(0, $charactersLength - 1)];
}
return $randomString;
}
?>