level09 on 08/21/09
Last Edited at 08/21/09 11:46am
function generate_rand($l){ $c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; srand((double)microtime()*1000000); for($i=0; $i<$l; $i++) { $rand.= $c[rand()%strlen($c)]; } return $rand; }
Report this snippet Tweet
Comment:
You need to login to post a comment.