06-09-2008, 08:46 PM
|
#7 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
Not really JUST a random integer generator, but a common one
PHP Code:
$hash_table = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9)); $code_length = 6; $code = '';
for($i = 0; $i < $code_length; $i++) { shuffle($hash_table);
$code .= $hash_table[rand(0, count($hash_table) - 1]; }
echo $code;

__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
Last edited by xenon : 06-10-2008 at 09:32 AM.
|
|
|
|