Sorry, I can't help with that! Haha.
Also - if you need to generate tons of codes and put them in a database, the code to get the code is:
PHP Code:
<?php
function generate_code(){
$abc = range("A", "Z");
$abc_i = range("a", "z");
$num = range("1", "9");
$r = array();
for($i = 0; $i < 5; $i++){
$random = rand(0, 3);
switch($random){
case 0:
$r[] = $abc[rand(0, count($abc)-1)];
break;
case 1:
$r[] = $abc_i[rand(0, count($abc_i)-1)];
break;
case 2:
$r[] = $num[rand(0, count($num)-1)];
break;
case 3:
$r[] = $num[rand(0, count($num)-1)];
break;
}
}
return implode($r);
}
echo generate_code();
?>
While it might return the same code twice - it is very unlikely.
Bookmarks