I know that true randomness only exists in nature. However, the
randomization in PHP is fairly good. I have only used it on fairly small
scales (i.e. Randomizing 200 quotes to give a random quote when people log
onto a page.)
For passwords I have always gone an easier route.
$password = time();
This is one I like to use jozef.
function generate_password($length = 10) {
$allowable_characters = "abcdefghjkmnopqrstuvwxyz23456789";
$ps_len = strlen($allowable_characters);
mt_srand((double)microtime()*100);
$pass = "";
for($i = 0; $i < $length; $i++) {
$pass .= $allowable_cha
return $pass;
}else{
change_password($id, $password);
}
bastien
From: "Wendell Frohwein" <[EMAIL PROTECTED]>
To: "'J. Connolly'" <[EMAIL PROTECTED]>,"'PHP list'"
Subject: RE: [PHP-DB] Random Password problem
D
J. Connolly wrote:
I am using this php in order to create, store and send random passwords
to people who want to join my mailing list.
your seeding the randomizer with the value zero each time!
the expression:
(integer) md5(microtime())
is (almost) always going to equal zero (unless it
happens to