Here there is a simple example for generate a random password using php, it is quite easy and simple to make.
$length =10; // the length of the required password length
$characters_to_use ="abcdef1234567890"; // characters are to be use in your password
for($i = 0; $i < $length; $i++)
{
$do = mt_rand(0,strlen($characters_to_use)-1);
$password = $password . $characters_to_use{$do};
}
echo $password; // here you can view the password
No comments:
Post a Comment