Results 1 to 3 of 3

Thread: Rotating Ad Scripts

  1. #1
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Rotating Ad Scripts

    I am looking for a script that will allow me to rotate banner ads. For example, everytime someone visits my site, they will see a different banner ad at random. Got any suggestions.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,903
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    You'll want to use a server side script for this, assuming you want to do any sort of tracking on the ads (impressions, clicks etc). Phpadsnew is the best free ad rotation script I know (PHP required)>

  3. #3
    Join Date
    Oct 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Below is a script I used for my own banners. Of course you'll need to change the links and images to yours and also change the array size to much the number of banners:

    <!-- Rotating Banner -->

    <SCRIPT LANGUAGE="JavaScript">
    <!--

    //add your banner image links

    var imgs = new Array ("http://www.trafficoasis.com/images/banner1.gif","http://www.sendfree.com/images/abansf1.gif","http://www.gditeambuilder.ws/Tutorials/gdi_468_3.gif","http://www.justarticlesvip.com/images/banner468-60.gif","http://www.payitforward4profits.com/members/images/banner_468x60.jpg")

    //add each corresponding affiliate site
    var lnks = new Array ("http://www.trafficoasis.com/index.php?133835","http://www.sendfree.com/affref/93791","http://www.gditeambuilder.ws/index.php?refid=gkissi","http://www.justarticlesvip.com/amember/go.php?r=152&i=b0","http://www.payitforward4profits.com/gkissi")
    var altimg = new Array ("UltimateMLMLeads","Signup with SendFree Now!","Are you part of GDI Yet?","Just Articles VIP Club","Funded Sponsoring Franchise!")
    var currentAd = 0
    var imgCt = 5 //change this to match the number of images
    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) //banner changes every 10 sec
    }
    //-->
    </SCRIPT>

    //the first banner that appears
    <a href="http://www.trafficoasis.com/index.php?133835" name="adLink" target="_blank"><img src="http://www.trafficoasis.com/images/banner1.gif" name="adBanner" border="0" width="468" height="60"></a>

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    cycle()
    //-->
    </SCRIPT>

    I hope this helps.

    George

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •