Re: Password generator

From: Date: Tue, 17 Jun 2003 10:07:36 +0000
Subject: Re: Password generator
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-28670@lists.php.net to get a copy of this message
> a simple way would be to : $pass = $allowable_characters[mt_rand(0,$ps_len-5)] for($i = 0; $i < ($length -2); $i++) { $pass .= $allowable_characters[mt_rand(0,$ps_len-1)]; } $pass .= $allowable_characters[mt_rand(0,$ps_len-5)] // This variable contains the list of allowable characters // for the password. Note that the number 0 and the letter // 'O' have been removed to avoid confusion between the two. // The same is true of 'I' and 1 > btw, you didn't implement this. hope this helps ramil

« previous php.db (#28670) next »