RE: [PHP] 1.2 million random numbers
| From: | Maxim Maletsky | Date: | Thu, 12 Oct 2000 08:54:17 +0000 |
| Subject: | RE: [PHP] 1.2 million random numbers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19782@lists.php.net to get a copy of this message | ||
we had that raised in this list 3-4 days ago.
the only thing to add is that you will need to create a loop that breaks on
1.2 millions, and after each number is generated add it to the database
assigning a field to whatever you want associate the number with...
man, 1.2 million.... a lot...
maybe that would be a great idea to break the process into different
databases/tables, or even better (if it's possible) somehow to generate one
after one right on the moment it is needed to be issued checking the
database for duplicates.
I remember in email posted here before we were saying that the probability
of a duplicate string is relatively small.
see archives, search your mailbox... the answer is here...
Cheers!
-----Original Message-----
From: Marcel Lindenbergh [mailto:m.lindenbergh@wxs.nl]
Sent: Thursday, October 12, 2000 5:23 PM
To: PHP
Subject: [PHP] 1.2 million random numbers
Hello,
I need to generate 1.2 million random numbers for a contest. What is the
best way to generate these so no one can calculate/crack the codes?
The codes need to be 10-characters, either digits or letters.
Any help is appreciated. Thank you.
Best regards,
Marcel Lindenbergh
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net