Use this function, the "$num" argument, is the total
of numbers. Ex: if $num is 5, the funtion will return
"56743", is five numbers.
function random($num)
{
srand ((double) microtime() * 1000000);
$temp = rand().rand().rand();
$temp = substr($temp, 0, $num);
return $temp;
} //fim function random
--- Rosen <[EMAIL PROTECTED]> escreveu: > Hi,
> I'm using PHP code from manual:
> srand( (double) microtime() * 1000000);
> // Get random User ID
> $uid=rand();
>
> but it dowsn't work !
>
> Thanks,
>
> Rosen
>
>
>
>
>
>
>
> --
> PHP General 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]
>
_______________________________________________________________________________________________
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil
e grátis!
http://br.geocities.yahoo.com/
--
PHP General 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]