Generating Random Password in PHP :
Here is an example to create a function that generates a random password.
We will call the function randomgeneratepass():
<?
function randomgeneratepass()
$charslist = “1234567890abcdefGHIJKLMNOPQRSTUVWxyzABCDEF
ghijklmnopqrstuvwXYZ1234567890″;
$thepass = ‘’;
for($i=0;$i<7;$i++)
{
$pass .= $charslist{rand() % 39};
}
return $pass;
}
//we can use the function as follows
$password=randomgeneratepass();
?>
