NYCPHP Meetup

NYPHP.org

[nycphp-talk] Bnner Rotation

Odra Gola odragola at gmail.com
Mon Mar 6 13:32:16 EST 2006


Hello,
This is a logic issue and may be considered Off-Topic, but since I'm using
PHP for this project and I know this list is full of very smart people,
there is no better place to ask for help.

I have a page where three *different* banners ads should be displayed. I
have a pool of tens of banner ads from which the 3 banners should be
picked.  Each banner in the pool has a *weight* value which indicates how
often a banner should be displayed relatively to other banners within a
period of one month  (i.e. a banner with weight = 2 should be displayed
twice as often as a banner with weight = 1).
The set of three banners to be displayed should be rotated every hour (cron
job). The amount of impressions is not important.  The banners in the pool
and their weight values will be changed manually every month.

Well this is how it should work. However I'm not too sure how to come up
with an algorithm that will perform the hourly rotations.
I usually try to solve all my problems myself, but this time I have 2 other
deadlines by the end of today, I have a flu and this thing must be ready by
Wednesday morning.
The stress and the sickness screw with my head and I can't come up with any
logical solutions.

Any suggestions and help are greatly appreciated!
Cheers,
Olaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060306/be68bc16/attachment.html>


More information about the talk mailing list