note 87752 deleted from function.rand by thiago

From: Date: Fri, 19 Dec 2008 18:53:41 +0000
Subject: note 87752 deleted from function.rand by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148359@lists.php.net to get a copy of this message
Note Submitter: adi at example dot com ---- Easy way to create randomized passwords. 34 is the number of letters/numbers. You can also add special characters. If you do so, change 34 to number of characters (first char is 0) $a = 'abcdefghijklmnopqrstuvwxyz123456789'; $password = $a[rand(0,34)].$a[rand(0,34)]. $a[rand(0,34)].$a[rand(0,34)].$a[rand(0,34)]. $a[rand(0,34)].$a[rand(0,34)].$a[rand(0,34)]; echo $password;

« previous php.notes (#148359) next »