My adserver script has a small weighting problem that needs fixing. Basically I can have an advertiser with 15,000 ad views owed to them, and enter a 2nd advertiser with 10,000 ad views owed to them. The weighting problem will cause the 2nd advertiser with 10,000 ad views owed to not be shown once until the 1st advertiser with 15,000 ad views has their account lowered to 10,000.
In other words, the script uses a weighting system to show each advertiser once a rotation, unless a particular advertiser is owed more credits than another, or has a faster delivery speed. IN cases like that, it will not show any advertiser with less ad views then another advertiser, until all advertisers are owed the same amount.
Another example of this, is when it shows an advertiser 100 times so far that day, and a 2nd advertisers account is added. If they are owed near the same number of ad shows, say 10,000 each, then it will attempt to show advertiser 2 one hundred times in a row, in an attempt to match the fact that advertiser 1 had been seen 100 times so far that day.
I think the weighting this script is using is messed up, and might be trying to match to many things.
I want it to stop doing both of the above. I want it to begin showing both advertisers, each once per rotation, unless one of the accounts is given a higher delivery speed. Say a delivery speed of 1 while the 2nd account has a delivery speed of 10. In this case, the account 1 would be shown 10 times for every 1 time account 2 would be shown. But I do want every advertiser account created in the script to begin showing ads the second they are added to the database. And I dont want it trying to match the number of ads shown per day against any other account.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).