unique alphanumeric password generator function
Alphanumeric Password
echo randomPass();
function randomPass($minChar=4, $maxChar=10, $useChar='abcdefghijklmnopqrstu1234567890'){
$numChar = rand($minChar, $maxChar);
$numUsable = strlen($useChar) - 1;
$string = '';
for($i<0; $i<$numChar; $i++){
$rand_num = rand(0, $numUsable);
$string .= $useChar{$rand_num};
}
return $string;
}
echo randomPass();
function randomPass($minChar=4, $maxChar=10, $useChar='abcdefghijklmnopqrstu1234567890'){
$numChar = rand($minChar, $maxChar);
$numUsable = strlen($useChar) - 1;
$string = '';
for($i<0; $i<$numChar; $i++){
$rand_num = rand(0, $numUsable);
$string .= $useChar{$rand_num};
}
return $string;
}