LGPL license
<?php function newPass($length=6)
{
$password = "";
$passstring = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
for($i=0; $i<$length; $i++)
{
$password .= $passstring[rand(0, (strlen($passstring)-1))];
}
return $password;
} ?>
Sign up to add your own comment here!
Comments
|
This function also works great for homebrew captcha systems. I've got my own which works much the same way, but has several 'look alike' characters removed, 'O, 0, i, 1, etc..' |
More comments: 1
|
|