1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Rotate banners

Discussion in 'Black Hat SEO' started by DA MADFACE, Aug 4, 2013.

  1. DA MADFACE

    DA MADFACE Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    167
    Likes Received:
    25
    Hi,

    I want to rotate banners in all my websites.
    But I want to use the same code to all my websites
    And I want to be able to edit the banners and links without having to go to my websites and edit them.

    What do you guys suggest?
     
  2. ahiddenman

    ahiddenman Elite Member

    Joined:
    Dec 11, 2010
    Messages:
    2,647
    Likes Received:
    2,087
    Location:
    204.15.23.255
    Google "free banner rotator html" or if your using WP there are many free plugins for this :)

    All the best!
     
  3. DA MADFACE

    DA MADFACE Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    167
    Likes Received:
    25
    Thanks, but can you tell me one that actually work...
    I dont want to use a script from any website since it can be a scam
     
  4. ahiddenman

    ahiddenman Elite Member

    Joined:
    Dec 11, 2010
    Messages:
    2,647
    Likes Received:
    2,087
    Location:
    204.15.23.255
    What are you using HTML or a CMS (Content Management system i.e Wordpress) ?
     
  5. DA MADFACE

    DA MADFACE Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    167
    Likes Received:
    25
    HTML....I want to use it for wordpress and blogger...but I dont want a wordpress plugin, because it need to work for all blogs
     
  6. scrapefox

    scrapefox Power Member

    Joined:
    Dec 3, 2011
    Messages:
    692
    Likes Received:
    277
    It's a long time since I've used it, but I believe this would be possible with openx.
     
  7. DA MADFACE

    DA MADFACE Junior Member

    Joined:
    Aug 27, 2011
    Messages:
    167
    Likes Received:
    25
    and i also want different banners by countries
     
  8. HeRBaR

    HeRBaR Supreme Member

    Joined:
    Aug 15, 2011
    Messages:
    1,216
    Likes Received:
    980
    Occupation:
    Sleeping
    Location:
    localhost
    Home Page:
    Doesn't DoubleClick do this???
    I am not very familiar with it, but I think that DoubleClick can do this for you.
     
  9. ahiddenman

    ahiddenman Elite Member

    Joined:
    Dec 11, 2010
    Messages:
    2,647
    Likes Received:
    2,087
    Location:
    204.15.23.255
  10. BadyBoySEO

    BadyBoySEO Regular Member

    Joined:
    May 17, 2013
    Messages:
    320
    Likes Received:
    94
    Location:
    United Kingdom
    Can do some simple Java
    Code:
    <script type="text/javascript"><!--
    //I. Array of banner that will randomly appear
    
    
    var randompic = new Array ( );
    randompic[0] = "";
    randompic[1] = "";
    randompic[2] = "";
    randompic[3] = "";
    randompic[4] = "";
    randompic[5] = "";
    randompic[6] = "";
    randompic[7] = "";
    randompic[8] = "";
    randompic[9] = "";
    //II. Array of links that will randomly appear
    
    
    var randomlink = new Array ( );
    randomlink[0] = "";
    randomlink[1] = "";
    randomlink[2] = "";
    randomlink[3] = "";  
    randomlink[4] = ""; 
    randomlink[5] = "";
    randomlink[6] = "";
    randomlink[7] = ""; 
    randomlink[8] = "";
    randomlink[9] = "";
    //III. function to generate number from 0 to n
    
    
    function randomzero (n)
    {
      return ( Math.floor ( Math.random ( )*0.9999999999999999* (n + 1)) );
    }
    
    
    //IV. assign any random number from 0 to 2 to x.
    
    
    x = randomzero(9);
    
    
    //V. display the image
    document.write('<a href="http://' + randomlink[x] + '" rel="nofollow">');
    document.write('<img alt="random ad banner" src="' + randompic[x] + '"/>');
    document.write('</a>');
    //-->
    </script> 
    Just change randomzero value to the number of banners you want to rotate in that location. So if you have filled in up to randompic 6, enter 6 as the value. I have another piece of Java that does the same thing, once you feed the banners in once it can be placed on all your websites. You need to remove the http:// off the front of the URL as the http:// is added in the document write function. Can handle Java and HTML ads not flash though.

    Or
    Code:
    <script language="JavaScript"><!-- Begin
    var total_banner = 3;
    var actual_time = new Date()
    var second = actual_time.getSeconds()
    var show_the_banner = second % total_banner;
    show_the_banner +=1;
    if (show_the_banner==1) {
    txt="";
    url="";
    alt="";
    banner="";
    width="";
    height="";
    }
    if (show_the_banner==2) {
    txt="";
    url="";
    alt="";
    banner="";
    width="";
    height="";
    }
    if (show_the_banner==3) {
    txt="";
    url="";
    alt="";
    banner="";
    width="";
    height="";
    }
    document.write('<center>');
    document.write('<a rel="nofollow" href=\"' + url + '\" target=\"_top\">');
    document.write('<img src=\"' + banner + '\" width=')
    document.write(width + ' height=' + height + ' ');
    document.write('alt=\"' + alt + '\" border=0><br>');
    document.write('<small>' + txt + '</small></a>');
    document.write('</center>');
    // End -->
    </script> 
    The second piece of code is easier to use most probably. Though neither will do country geo-targetting, to do that you need a much more complicated Java set-up and it's a pain have looked into myself.
     
    Last edited: Aug 4, 2013
  11. BadyBoySEO

    BadyBoySEO Regular Member

    Joined:
    May 17, 2013
    Messages:
    320
    Likes Received:
    94
    Location:
    United Kingdom
    Okay have worked out how to implement what you need, though I'm not going to give it away for free.