RE: [PHP] Password Generator Script

From: Date: Thu, 25 Jul 2002 06:50:46 +0000
Subject: RE: [PHP] Password Generator Script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109645@lists.php.net to get a copy of this message
function generate_passwd($length = 50) { $pass = ""; // all the chars we want to use $all = explode(" ", "a b c d e f g h j k m n p q r s t w x y z " ."A B C D E F G H J K L M N P Q R S T W X Y Z " ."2 3 4 5 6 7 8 9"); for($i=0;$i<$length;$i++) srand((double)microtime()*1000000); $randy = rand(0, 50); if ($all[$randy]!=" ") $pass .= $all[$randy]; if (strlen($pass)>7) return $pass; } } } } $password = generate_passwd(8); -- I got the above script these days from http://www.devnetwork.net/forums/viewforum.php?f=1. FYI K.Tomono > -----Original Message----- > From: Monty [mailto:monty3@hotmail.com] > Sent: Thursday, July 25, 2002 1:49 PM > To: php-general@lists.php.net > Subject: [PHP] Password Generator Script > > > Can anyone recommend where I could find a decent script that > automatically > generates passwords? I don't care if they are readable or just random > letters, numbers. > > Thanks! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#109645) next »