note 17198 deleted from function.rand by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 19:30:32 +0000 |
| Subject: | note 17198 deleted from function.rand by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23149@lists.php.net to get a copy of this message | ||
To make a password based on random U/L-chars and digits, one might use this :
<?php
mt_srand ((double) microtime() * 1000000);
$string = md5(microtime());
$password = substr($string, 0, 8);
?>
Which would give random passwords with 8 chars. =8-)