Re: PHP random n. problem?
| From: | Andrew | Date: | Fri, 14 Jul 2000 17:58:41 +0000 |
| Subject: | Re: PHP random n. problem? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6687@lists.php.net to get a copy of this message | ||
Dear Jacek,
phpAds isn't very random because it uses the shuffle function to
randomize the banners. If you can wait a few weeks digi-ads 2.0 will be
released with an algorithm better than phpAds that supports banner weight
(currently uses phpAds algorithm).
digi-ads is availabe on my website at http://www.digi-fx.net
Andrew
digi-FX
-------------------------------
http://www.digi-FX.net
----- Original Message -----
From: Jacek <jacek@oi.idl.krakow.pl>
To: <php-general@lists.php.net>
Sent: Friday, July 14, 2000 10:46 AM
Subject: [PHP] PHP random n. problem?
> Are there any known problems with generating random numbers in PHP?
>
> I'm using php 4.0.1pl2 on RH 6.2.
>
> I installed the banner script phpAds - which works fine, with one
> exception: random banner selection seems not to be very "random".
> Instead of each banner having the same probability, and thus - periodity
> of display, some banners get displayed very often, whereas others don't
> get displayed at all!
>
> All banners belong to the same group - so they really SHOULD get displayed
> equally often! I suspect some major random number generator bug - if I
> change the banners database (change order, delete and put back again
> etc.) - different banners "dominate' while some other banners get
> 'discriminated'.
>
> ...or have done something wrong with the phpAds itself?
> Any clues?
>
> Jacek Juda
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>