[PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread lallous

Yes, you're right about that point since the seed in most cases is computed
from system time = increasing probability of having same number @ the same
request time...
you can change the seed with the time() too (not all days are the same).

hope to hear others' opinions too.

Elias

Leif K-Brooks [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm wondering if random numbers in a cronned script would be anywhere
 near random (I know that rand() isn't true random, but I don't want
 every number to be the same...)?  Since the number is seeded from
 time... and cron runs by time...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread Martin Towell

if you seed it with unix time then you'll alway be seeding with something
different
in most cases, the random numbers that are generated will be random enough

just my AU2c worth
Martin

-Original Message-
From: lallous [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 13, 2002 6:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Random numbers in a cronned script?


Yes, you're right about that point since the seed in most cases is computed
from system time = increasing probability of having same number @ the same
request time...
you can change the seed with the time() too (not all days are the same).

hope to hear others' opinions too.

Elias

Leif K-Brooks [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm wondering if random numbers in a cronned script would be anywhere
 near random (I know that rand() isn't true random, but I don't want
 every number to be the same...)?  Since the number is seeded from
 time... and cron runs by time...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php