note 40266 deleted from function.rand by nlopess

From: Date: Thu, 26 Feb 2004 21:33:01 +0000
Subject: note 40266 deleted from function.rand by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65847@lists.php.net to get a copy of this message
Note Submitter: ncesar@lunix.com.ar ---- a simple function to generate simple nemonic passwords. adjust 'es' array to your preference common users are not so smart some times and they forget passwords like 'JhgtBvX' even they are very good password for the purist. <?php /* Copyright (c) 2004 Nicolas D. Cesar * mkpasswd is distributed under the terms of * the GNU General Public License (GNU GPL) */ function mkpasswd() { $es=array('ma', 'be', 'li', 'ro','ne', 'ci', 'mo', 'bu', 'pi', 'no', 'nu', 'va', 'ro', 'du', 'pa', 'de', 'su', 'fa', 'que', 'pin', 'ta', 'je', 'qui', 'go','vu', 'ka'); for ($a = 0 ; $a < 4 ; $a++) { $ret .= $es[rand(0,sizeof($es))]; } $ret .= rand(1,99); return $ret; } ?>

« previous php.notes (#65847) next »