[GET] Simple Banner rotator script

 
Hostwinds

Results 1 to 1 of 1
I looked forever to find a rotator script for my banners that i could use ...
  1. #1
    fbrcold's Avatar
    fbrcold is offline Junior Member
    Join Date
    Jul 2008
    Location
    USA
    Posts
    151
    Thanks
    78
    Thanked 274 Times in 65 Posts

    Default [GET] Simple Banner rotator script

    I looked forever to find a rotator script for my banners that i could use on my php sites, facebook apps, and wordpress. I had someone develop this for me and it works perfect so I am sharing it with the community. I think it is self explanatory.

    To change the size of the ads just change the size of width and height.

    I hope this helps some of you.
    Code:
    <script type="text/javascript">
    <!-- Begin
    rnd.today=new Date();
    rnd.seed=rnd.today.getTime();
    
    function rnd() {
            rnd.seed = (rnd.seed*9301+49297) % 233280;
            return rnd.seed/(233280.0);
    };
    
    function rand(number) {
    	var result = Math.ceil(rnd()*number);
    	if (!result)result++;
            return result
    };
    var ad_cnt2 = 10;
    var ad2 = rand(ad_cnt2);
    var link2;
    var adBanner2;
    var width2
    var height2
    if (ad2==1) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==2) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==3) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==4) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==5) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==6) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==7) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==8) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==9) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    if (ad2==10) {
    link2="http://youraffiliatelink.com";
    adBanner2="http://yoursite.com/image.jpg";
    width2="728";
    height2="90";
    alt2="Your Alt text";
    }
    document.write('<center><a href="' + link2 + '" target="_blank">');
    document.write('<img src="' + adBanner2 + '" width=' + width2 + ' height=' + height2 + ' border=0 
    
    alt="' + alt2 + '"></a>');
    document.write('</center>');
    // End -->
    </SCRIPT>

  2. The Following 2 Users Say Thank You to fbrcold For This Useful Post:

    blackjack (01-30-2013), pasenseoso (02-01-2013)




Similar Threads

  1. Banner Ad Rotator Script - How to include an iframe banner?
    By Joline86 in forum HTML & JavaScript
    Replies: 1
    Last Post: 06-15-2011, 06:22 PM
  2. Banner Rotator
    By temporary in forum BlackHat Lounge
    Replies: 4
    Last Post: 08-02-2010, 01:30 PM
  3. Need a simple banner rotating script
    By smokie32 in forum Hire a Freelancer
    Replies: 1
    Last Post: 04-27-2010, 12:58 AM
  4. Banner/Ad Rotator
    By Sara in forum Blogging
    Replies: 1
    Last Post: 11-02-2008, 10:25 AM

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
  •  


 



BlackHatWorld on Twitter BlackHatWorld on FaceBook


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109