1
0
Fork 0
template/functions/pw-random.php

11 lines
213 B
PHP
Raw Permalink Normal View History

2024-04-25 21:55:08 +02:00
<?php
function pw_random($digit = 20) {
$comb = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*';
$shfl = str_shuffle($comb);
$pwd = substr($shfl, 0, $digit);
return $pwd;
}
?>