[PHP-DB] Random Password problem

2005-03-08 Thread J. Connolly
I am using this php in order to create, store and send random passwords to people who want to join my mailing list. ?php function random_password () { $seed = (integer) md5(microtime()); mt_srand($seed); $password = mt_rand(1,); $password = substr(md5($password), 3,9); return $password;

Re: [PHP-DB] Random Password problem

2005-03-08 Thread Stephen Johnson
PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From: J. Connolly [EMAIL PROTECTED] Date: Tue, 08 Mar 2005 14:41:11 -0500 To: PHP list php-db@lists.php.net Subject: [PHP-DB] Random Password problem I am using this php in order to create

RE: [PHP-DB] Random Password problem

2005-03-08 Thread Wendell Frohwein
.= $allowable_characters[mt_rand(0,$ps_len-1)]; } return $pass; } Its been working well for me for sometime. -Wendell Frohwein -Original Message- From: J. Connolly [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 11:41 AM To: PHP list Subject: [PHP-DB] Random Password problem I am using this php

RE: [PHP-DB] Random Password problem

2005-03-08 Thread Bastien Koert
Frohwein [EMAIL PROTECTED] To: 'J. Connolly' [EMAIL PROTECTED],'PHP list' php-db@lists.php.net Subject: RE: [PHP-DB] Random Password problem Date: Tue, 8 Mar 2005 11:51:59 -0800 This is one I like to use jozef. function generate_password($length = 10) { $allowable_characters

Re: [PHP-DB] Random Password problem

2005-03-08 Thread Jochem Maas
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. ?php function random_password () { $seed = (integer) md5(microtime()); mt_srand($seed); your seeding the randomizer with the value zero each time! the