Do you mean W3E4-22ER would be valid? If so there would be 36^8
(2,821,109,907,456) possible values.
A truly random generator algorithm cannot guarantee uniqueness. I'm
guessing what you want is to generate each possible value once in a
pseudo-random order. Would just apparent randomness suffice?
With what frequency do the values need to be generated? Once every few
seconds/minutes or multiple times per second?
~~LF
Sigurd Magnusson wrote:
> Whats the best way to make a completely random, unique code in the
> format "ABCD-1234" where each of the 8 characters can be alphanumerc;
> 0-9,A-Z... I thought about generating a 36^4 number, converting to to
> base '36', and repeating the process. What's a good way to ensure the
> code is not repeated, though?
>
> Siggy
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]