Random passwords

This is a function to generate random passwords

<?php
function random_password ()
{
$seed = (integer) md5(microtime());
mt_srand($seed);
$password = mt_rand(1,99999999);
$password = substr(md5($password), mt_rand(0, 19), mt_rand(6, 12));
return $password;
}
?>
<?php
$msg = random_password();
echo $msg;
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*