- substr: documentation ( source)
- microtime: documentation ( source)
- rand: documentation ( source)
- srand: documentation ( source)
<?php
$chars = "023456789ABCDEFGHJKLM023456789NPQRSTUVWXYZ023456789";
srand( (double) microtime() * 1000000 );
$i = 0;
$temppassword = '';
while ( $i <= 20490 ) {
$num = rand() % strlen( $chars );
$tmp = substr( $chars, $num, 1 );
$temppassword = $temppassword . $tmp;
$i++;
}
echo $temppassword;