A function that generates strong passwords by mixing uppercase and lowercase characters with numbers.
function RandPass($PassLength)
{
$PassStr = "";
for ($i = 0; $i <= $PassLength; $i++)
{
$CurrChar='';
switch (mt_rand(1,3))
{
case 1:
$CurrChar = chr(mt_rand(48,57));
break;
case 2:
$CurrChar = chr(mt_rand(65,90));
break;
case 3:
$CurrChar = chr(mt_rand(97,122));
}
$PassStr .= $chr;
}
return $PassStr;
}