1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Add rotator script

Discussion in 'Content Management' started by mrwordsworth, Dec 31, 2007.

  1. #1
    Please tell me any open source script i can use to rotate ads on my site, i wish to add google adsense and some custom banners............

    i tired openads but i think its not a good tool for a single publisher......

    any other such tool available?
    Thanks
     
    mrwordsworth, Dec 31, 2007 IP
  2. archard

    archard Peon

    Messages:
    221
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what I do is just save each individual piece of code in its own file called "(number).html". So for example you could have one particular block of adsense in a file called "1.html", and code for a custom banner in "2.html". Then on the page you want to load the script just say something like this:

    
    <php
    
    $random = rand(1, 10); //random number between 1 and 10
    
    include($random . '.html');
    
    ?>
    
    Code (markup):
     
    archard, Dec 31, 2007 IP
  3. mrwordsworth

    mrwordsworth Active Member

    Messages:
    1,289
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    90
    #3
    thanks for the code
     
    mrwordsworth, Dec 31, 2007 IP
  4. a-humblekid

    a-humblekid Peon

    Messages:
    90
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    a-humblekid, Jan 1, 2008 IP