Hello, can you recommend me a free and good banner rotating script? I searched on google, only found payed scripts. I used to use OpenX but since the upgrade to PHP 5.3 my old version became obsolete and right now I'm looking for an alternative. Thank You
i have never used a commercial one so i dont know what features you want / need. i have one i created myself that uses a random number to randomly pull up affiliate ads. Its extremely primitive (text editor used to update and manage the ads). would that be useful to you? or what features do you need?
All I need is to be able to set up banner positions. I add banners to those positions and then he rotates trough them. I need it to be able to display images, html code or javascript. I need to be able to disable/enable a banner (not only delete).
Here is rotating banner javascript. I added 10 number of banners. Also change the timeout to require seconds. You can add more banners if you wish or reduce the number of banners if not required. <!-- Rotating Banner by Uday Kurtkoti --> <SCRIPT LANGUAGE="JavaScript"> <!-- var imgs = new Array ("Banner 1 Image URL ","Banner 2 Image URL ","Banner 3 Image URL ","Banner 4 Image URL ","Banner 5 Image URL ","Banner 6 Image URL ","Banner 7 Image URL ","Banner 8 Image URL ","Banner 9 Image URL ","Banner 10 Image URL ") var lnks = new Array ("banner 1 URL","banner 2 URL","banner 3 URL","banner 4 URL","banner 5 URL","banner 6 URL","banner 7 URL","banner 8 URL","banner 9 URL","banner 10 URL") var altimg = new Array ("") var currentAd = 0 var imgCt = 10 function cycle() { currentAd++ if (currentAd == imgCt) { currentAd=0 } document.adBanner.src=imgs[currentAd] document.adBanner.alt=altimg[currentAd] adLink.href=lnks[currentAd] setTimeout("cycle()",10 * 1000) } //--> </SCRIPT> <a href="banner 1 URL" name="adLink" target="_blank"><img src="Banner 1 Image URL " name="adBanner" border="0" width="468" height="60"></a> <SCRIPT LANGUAGE="JavaScript"> <!-- cycle() //--> </SCRIPT> Code (markup):
if some one can help me with html code to make rotate html ads code and to be lead to a link ? i mean i need to rote many html ads code
I've used the above script for several years and its great. I've just discovered it doesn't work in Chrome though. "Uncaught reference error - adlink is not defined" Can anyone help?
<!-- Rotating Banner by Uday Kurtkoti --> <SCRIPT LANGUAGE="JavaScript"> <!-- var imgs = new Array ("Banner 1 Image URL ","Banner 2 Image URL ","Banner 3 Image URL ","Banner 4 Image URL ","Banner 5 Image URL ","Banner 6 Image URL ","Banner 7 Image URL ","Banner 8 Image URL ","Banner 9 Image URL ","Banner 10 Image URL ") var lnks = new Array ("banner 1 URL","banner 2 URL","banner 3 URL","banner 4 URL","banner 5 URL","banner 6 URL","banner 7 URL","banner 8 URL","banner 9 URL","banner 10 URL") var altimg = new Array ("") var currentAd = 0 var imgCt = 10 var adLink = document.getElementsByName('adLink')[0] function cycle() { currentAd++ if (currentAd == imgCt) { currentAd=0 } document.adBanner.src=imgs[currentAd] document.adBanner.alt=altimg[currentAd] adLink.setAttribute('href', lnks[currentAd]) setTimeout("cycle()",10 * 1000) } //--> </SCRIPT> <a href="banner 1 URL" name="adLink" target="_blank"><img src="Banner 1 Image URL " name="adBanner" border="0" width="468" height="60"></a> <SCRIPT LANGUAGE="JavaScript"> <!-- cycle() //--> </SCRIPT> Code (markup): Should work in chrome
I would recommend you to make your own banner rotating script then using others one you can store pics in images folder and use random function to select random, number and browse that image using img src tag of the html
try ledads -- it older but can rotate banners or raw html code and its free http://www.ledscripts.com/free/perl/ledads
What about a banner script that can rotate html codes, like Adsense, so you can mix Adsense with the other ads? I have trouble finding one that works.
Here's a pretty easy one. Just save it under whatever file name you want: <?php $advert = array(); $advert[] = '<a href="#" target="_blank"><img src="#"></a>'; $advert[] = '<a href="#" target="_blank"><img src="#"></a>'; $advert[] = '<a href="#" target="_blank"><img src="#"></a>'; $advert[] = '<a href="#" target="_blank"><img src="#"></a>'; $advert[] = '<a href="#" target="_blank"><img src="#"></a>'; shuffle($advert); echo $advert[0]; ?> Code (markup): Then use an include with your file name: <?php include("your-file.php"); ?> Code (markup):
Hi, I have create a better one. With my rotator you can rotate in the same time scripts like Exoclick ads(scripts) and just image ads with link or even text links. Also you can select how many ad spots have in your site. If you have 2 spots script selects 2 unique ads to display. This is my code: rotator_script.php <?php // rotator_script.php //This is the banner array //I have 2 folders one (images/rotator) for image ads and one (rotator) with files which include scripts ads. $banners = array( array( "title" => "bla bla bla", "img" => "images/rotator/banner1.png", "script" => "", // this empty because it's image ad "url" => "http://site1.com" ), array( "title" => "bla bla bla", "img" => "images/rotator/banner2.png", "script" => "", "url" => "http://site2.com" ), array( "title" => "Exoclick Ad", "img" => "", // this empty because it's script ad "script" => "rotator/exoclick.php", "url" => "" ), array( "title" => "AdQueen Ad", "img" => "", "script" => "rotator/adqueen.php", "url" => "" ) ); $selectedBanners = array(); function initRotator ($ads) { $this->selectedBanners = array_rand($this->banners, $ads); //with array_rand you give the amount of banners which you want to display to have uniques always if you have 2 ad spots you give number 2 } function showBanner ($x) { $x = $x - 1; // as parameter you can use from 1 until your limit (not 0) if (empty($this->banners[$this->selectedBanners[$x]]['script'])) { echo '<a href="' . $this->banners[$this->selectedBanners[$x]]['url'] . '" target="blank"><img src="' . $this->banners[$this->selectedBanners[$x]]['img'] . '" alt="' . $this->banners[$this->selectedBanners[$x]]['title'] . '" /></a>'; } else { include($this->banners[$this->selectedBanners[$x]]['script']); } } ?> PHP: and you must initialize. Put after this code.. <?php initRotator(2); // I have 2 spots in my page ?> PHP: and in your spots you put the random rotating ads which change in every refresh. <div id="adspot1><?php showBanner(1); ?></div> .... .... .... <div id="adspot2><?php showBanner(2); ?></div> .... .... Code (markup): I hope that will help you.