note 15537 deleted from control-structures.for by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 19:22:28 +0000 |
| Subject: | note 15537 deleted from control-structures.for by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25240@lists.php.net to get a copy of this message | ||
Nice easy and quick random 32 char string generator. Very usefull for salts and logins.
<?
$useridseeds =
array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
$newuserid = "";
for ($i=0;$i<32;$i++) {$newuserid = $newuserid.$useridseeds[rand(0,count($useridseeds))];}
$newuserid = md5($newuserid);
?>