note 21847 deleted from function.md5 by jimw

From: Date: Sat, 08 Feb 2003 19:48:48 +0000
Subject: note 21847 deleted from function.md5 by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-43634@lists.php.net to get a copy of this message
Follow-up from devans_nospam@law.uchicago.nospam.edu I take it from what you were mentioning the modified script from dpiper@stens.com would look something like: function generatekey($count) { // using a predetermined character set // in this example the characters ! $ 0-9 @ A-Z a-z mt_srand((double)microtime()*1000000); $key = ""; for ($i=0; $i<$count; $i++) { $rndchr=mt_rand(0,64); if ($rndchr==0) { $c=chr(33); } elseif ($rndchr==1) {$c=chr(36); } elseif ($rndchr<=11) {$c=chr(46+$rndchr); } elseif ($rndchr<=38) {$c=chr((52+$rndchr)); } else {$c=chr(58+$rndchr); }; $key .= $c; } return $key; }

« previous php.notes (#43634) next »