MastodonStartpage/web/mustard/include/randstr.php

13 lines
241 B
PHP
Raw Normal View History

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