Friday, October 12, 2007

gerar numeros aleatorios

function gerar_recibo_lotaria() {
$n = (float) microtime()*10000;
$n = (int)$n;
$n=(int)($n/25);
$randval = rand($n, 9999);
$randval = sprintf("%04d",$randval);

return $randval;
}
?>

No comments: