dflow Posted October 29, 2008 Share Posted October 29, 2008 hi all im building a new website i'm looking into scripts to manage ad space on the website, it needs to have stats and report generation so i can send reports to clients buying ad space. any recommendations and insights? Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/ Share on other sites More sharing options...
dflow Posted November 2, 2008 Author Share Posted November 2, 2008 BUMP!! waasup guys no one sells advertising on their website Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-680508 Share on other sites More sharing options...
bobbinsbro Posted November 2, 2008 Share Posted November 2, 2008 check out http://www.hotscripts.com/PHP/Scripts_and_Programs/Ad_Management/index.html if you want to write your own and want help, could you provide more details about what you want to do with the script? Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-680516 Share on other sites More sharing options...
dflow Posted November 3, 2008 Author Share Posted November 3, 2008 yeah i checked that out downloaded some demos to see what they offer what i need is a system where i can track impressions and clicks per banner and to rotate them accordingly while terminating a banner showing when he reaches xk impressions or clicks in addition to accumulate the data in a database so ad space buyers can see reports of their media performance Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-681067 Share on other sites More sharing options...
bobbinsbro Posted November 3, 2008 Share Posted November 3, 2008 i think what i'd do is this: create table in the DB called banners (or something similar) structured: -bannerID - a SERIAL type column (unique int, auto increment, not null, primary key, in case you don't use mysql) -ownerID - a unique id each ad owner receives so he can view ad statistics -url - the url to which you redirect when the banner is clicked -src - the path to the file that contains the banner (i assume most will be .swf files). -totalViews - the total amount of times a banner was loaded into a page -totalClicks - the total amount of times a banner was clicked -maxViews - cap of impressions, after which you retire the banner -maxClicks - cap of clicks, after which you retire the banner you could also add (since i assume you will charge by the month, an ad-space buyers will want to ses this): -monthlyViews - total views from the 1st of the month -monthlyClicks - total clicks from the 1st of the month for retired banners, you can either add an "active" boolean column, or create another, similar, table to which they will be moved. the second option will reduce the active banner table size, thuz shortening table lookup times, and probably lowering memory use. from here, it kinda depends on how you decide which banners to show. for example: 1) if you just want to show the banner with the lowest totalViews (or lowest monthlyViews), you could probably get away with just send a "SELECT src FROM banners WHERE MIN(totalViews)"; and immediately after that send "UPDATE banners SET totalViews = (totalViews+1), monthlyViews = (monthlyViews + 1) WHERE MIN(totalViews)"; for clicks, just update the relevant columns in the table when you detect a click (i assume all banners call a php script with the banner id appended to the url to be retrieved by $_GET[]). 2) if the decision of which banner to show is complex (or even if it isn't) you may want to save the table lookup every time a user requests a page by creating a script that will run, say, once an hour (use sleep() or schedule a task with the relevant php extension). this script will find the 3-5 banners that will be shown for then next hour, populate a simple table (banner id, src, url, clicks and views columns) and your pages will update this smaller table. the once-an-hour script will update values in the main table from the statistics collected over the last hour by the intermediate table, and only then re-calculate which banners will be shown over the next hour. this way, you use a small, simple table, so lookup time is shorter, memory use is lower. the down side of this is that you may pass the manViews or maxClicks value during the hour between updates, and that banner use will not be even (over the short term), but rather these 3-5 banners will have higher views (compared to other banners) after 1 hour, but very low views (compared to other banners) after a few hours. but since you change the used banners once an hour, this should not matter much, since in the longer run (24-36 hours) things will be even more or less. i really hope this is the kind of post you wanted, otherwise i just wasted a whole lot of screen space in this thread Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-681099 Share on other sites More sharing options...
dflow Posted November 3, 2008 Author Share Posted November 3, 2008 hi you certainly didn't waste any screenspace, your reply was very informative . i will try and plan the layout according to your suggestions and design the be prepared for more feedback requests thx Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-681122 Share on other sites More sharing options...
bobbinsbro Posted November 3, 2008 Share Posted November 3, 2008 i forgot to mention: you may want to use some type of ip tracking/session, so that any 1 ip address does not count as a view/click more than x (maybe 3?) times an hour. i think ad-space buyers will appreciate such a feature. Link to comment https://forums.phpfreaks.com/topic/130563-need-recommendations-for-ad-space-management-script/#findComment-681229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.