no Az doesnt have one but here is a simple code for an adrotator. Create a php file call it Adrotator.php put this Create file called ads.txt and just put your code in for each banner seperated by ~ and just call your php file with an include I got this code from some site but can't remember where... but simple and works!
Here is mine, its taken from the same code as the code xboxundone has but it adds the feature of being able to define your source ads file. Useful if you run different ads or multiple sets of rotating ads on one page. Here is the adrotator.php <?php function show_randad($Source) { $fcontents = join ('', file ($Source)); $s_con = split("~",$fcontents); $banner_no = rand(0,(count($s_con)-1)); echo $s_con[$banner_no]; } ?> PHP: Here is an ads file: example - myads.txt <a href="banner link" target="_top" > <img src="banner image" width="468" height="60" alt="null" border="0"></a> ~ <a href="banner link2" target="_top" > <img src="banner image2" width="468" height="60" alt="null" border="0"></a> ~ PHP: And to call it: <?php /* Include this once at the top of the page */ include("Path/To/File/adrotator.php"); ?> PHP: <?php /* put the show_randad function in where you want to put your ads in and change the file in the () to the appropriate ads file */ show_randad("Path/To/File/myads.txt"); ?> PHP:
I agree its a great program. but if you really just want a simple ad rotator then the php code will do with much less work... but if you want to track more etc... yes phpadsnew is the way to go.
I must be a total twit..I don't understand where you place the ads file and how to make an "include" to a php file.
You would be better off just using Openads software. Very user friendly and customizable by adding weight to specific ads you want listed or viewed on site.
Thanks, but I already looked at Openads and it doesn't seem to show multiple ads without duplicates either. Besides, Openads is to heavy and it just does way much more then I need it to do. I just want to be able to store all my banner ads in a text document and have a script show however many ads I ask it to without showing duplicates. Any help would be much appreciated. Thanks, Tabitha
Anybody? There has to be a way. Just one line of code to the one LazyD posted. I wish I knew or could figure out how but I don't and I can't. So someone please help? Thanks, Tabitha