Published in: PHP
This function generates a random password of a specified length in lower or mixed case letters and numbers. Ambiguous characters, such as I, L, 1, 0, and O, are left out so the user can easily read the password.
function random_password($len = 7, $mixed_case = false) { $a = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789"; $out = ""; for($i = 0; $i < $len; $i++) return $out; }
Comments
Subscribe to comments
You need to login to post a comment.

apparently mt_rand() is up to 4x faster