I'm trying to create a PHP sequential random character generator that will output to a file database of some sort. The randomization needs to be using both capital letters and numbers. I need to output like 2 million records. Can someone point me in the right direction on how to do this?
I'm also looking to to this without letters as well.
First thing, something that is sequential is not random :)
Try this function, which I use sometimes
function randgen($len) { return strtolower(substr(md5(uniqid(time())), 0, $len)); }
Sample run
[EMAIL PROTECTED] -q test.php Random of length 8 : 47e03fef Random of length 10 : 17967d45de Random of length 20 : fbd5711ad011493947bc
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php