1
0
Fork 0
template/functions/pw-random.php
2024-04-25 21:55:08 +02:00

11 lines
No EOL
213 B
PHP
Executable file

<?php
function pw_random($digit = 20) {
$comb = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*';
$shfl = str_shuffle($comb);
$pwd = substr($shfl, 0, $digit);
return $pwd;
}
?>