RE: [PHP] Re: Random numbers in a cronned script?
| From: | Martin Towell | Date: | Fri, 13 Sep 2002 07:46:44 +0000 |
| Subject: | RE: [PHP] Re: Random numbers in a cronned script? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-116238@lists.php.net to get a copy of this message | ||
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:phplist@lgwm.org]
Sent: Friday, September 13, 2002 6:51 PM
To: php-general@lists.php.net
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" <eurleif@buyer-brokerage.com> wrote in message
news:3D819139.5080308@buyer-brokerage.com...
> 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