Sign up to add your own comment here!
$password = "";
$passstring = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
for($i=0; $i<$length; $i++)
$password .= $passstring[rand(0, (strlen($passstring)-1))];
More comments: 1
|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..'