I have created lots of diff banners for my site. I want these banners to rotate ie I want a different banner to load every time someone refreshes the page. But I want to do all this on my phpbb board, so I think the script will have to be in php. can someone help me out?
thats exactly I am doing rite now i mean installing phpadsnew Thats what you need http://phpadsnew.com/two/index.html
but i dont have a paid or ad banner. im just talking about diff graphic banners that i made for my site.
$Ad[0] = '<a href="http://www.site.com" TARGET="_blank">Site 0</a>'; $Ad[1] = '<a href="http://www.site1.com" TARGET="_blank">Site 1</a>'; $Ad[2] = '<a href="http://www.site2.com" TARGET="_blank">Site 2</a>'; $Weight[0]=3; $Weight[1]=3; $Weight[2]=3; $sum =0; for($i=0;$i<count($Weight);$i++) $sum+=$Weight[$i]; $ShowAd = rand(0, $sum - 1); for($i=0;$i<count($Weight);$i++) { if($ShowAd<=$Weight[$i]) { $ShowAd=$i; break; } else $ShowAd-=$Weight[$i]; } echo $Ad[$ShowAd]; PHP:
As mad4 has shown, you can whip up some PHP code to do this very quickly. However, long term I suggest looking at phpadsnew even just for the statistics it will give you.
i recently added a banner rotator in my Blog , which rocks . i am using the script from Automatic Labs
^ I think you are talking about this - http://automaticlabs.com/products/rotator/ Thanks, I'll try it out.