MastodonStartpage/web/mustard/include/randstr.php
pezcurrel 85876775c4 ...
2020-05-07 07:24:56 +02:00

12 lines
241 B
PHP

<?php
function randstr($len) {
$chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_:;\'"%&/?^';
$charslen=strlen($chars);
$str='';
for ($i=0; $i<$len; $i++)
$str.=$chars[rand(0,$charslen-1)];
return($str);
}
?>