Or is there a software to auto generate random passwords?
here is a function that generates a password with a minimum length, a minimum number of digits and a minimal number of letters.
function generatePassword() {
$min_length=8; //Minimum length of the password
$min_numbers=2; //Minimum of numbers AND special characters
$min_letters=2; //Minimum of letters
$password = '';
$numbers=0;
$letters=0;
$length=0;
while ( $length <= $min_length OR $numbers <= $min_numbers OR $letters <= $min_letters) {
$length+=1;
$type=rand(1, 3);
if ($type==1) {
$password .= chr(rand(33, 64)); //Numbers and special characters
$numbers+=1;
}elseif ($type==2) {
$password .= chr(rand(65, 90)); //A->Z
$letters+=1;
}else {
$password .= chr(rand(97, 122)); //a->z
$letters+=1;
}
}
return $password;
}