<?

function passgen() {
$password="";
$small="abcdefghijklmnopqrstuvwxyz";
$large="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$numbers="1234567890";
mt_srand((double)microtime()*1000000); 
for ($i=0; $i<8; $i++) { 
$type=mt_rand(1,3);
switch ($type) {
case 1:
$password.=$large[mt_rand(0,25)];
break;
case 2:
$password.=$small[mt_rand(0,25)];
break;
case 3:
$password.=$numbers[mt_rand(0,9)];
break;
}
}
return $password;
}


?>
