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

[HELP] Create Rotating Ad Banners For Web 2 Properties

Discussion in 'HTML & JavaScript' started by pasenseoso, Jun 28, 2013.

  1. pasenseoso

    pasenseoso Power Member

    Joined:
    Aug 19, 2011
    Messages:
    754
    Likes Received:
    136
    Occupation:
    hachetman
    Location:
    - - P I L I P I N A S - -
    Home Page:
    Hi BHW Programmers,

    I need some help with php or javascript.

    I need a script that will show ad banners to be placed in web 2 properties like blogger and weebly then once clicked it should point to our main site. Our site is about apartment rentals (just in our city) but we have side services like aircon repair and auto sales. I'm building 10 web 2 properties and instead of putting adsense ads, I want to put different ad banners that will point to our main site much like adsense does. Can it be done simply with php or javascript? Where do I host the script? Can you share a working script if there is any?

    Thanks bunch
     
  2. crazyflx

    crazyflx Elite Member

    Joined:
    Nov 9, 2009
    Messages:
    1,674
    Likes Received:
    4,825
    Location:
    http://CRAZYFLX.COM
    Home Page:
    I'm not sure this is what you're looking for. I wasn't completely clear after reading the OP.

    The script below will randomly load a banner from a set of predesignated banner images (you designate the images ahead of time). It will randomly load a new one on each page load.

    Working Demo: http://crazyflx.com/banner.html

    Place this where you want your banner image to appear:

    Code:
    <a href="http://yoursite.com"><img id="bannerimage" src="" /></a>
    Place this anywhere after that:

    Code:
    <script language="JavaScript">var imgs = ["images/image1.gif","images/image2.gif","images/image3.gif","images/image4.gif","images/image5.gif"]
    var rand = Math.round(Math.random()*imgs.length)
    onload=function() {
    bannerimage.src = imgs[rand]
    }
    </script>
    Obviously that means that all banners will only link to your main site, it's just that the image will be random on page load. Each image won't link to a different location.
     
    • Thanks Thanks x 1
  3. crazyflx

    crazyflx Elite Member

    Joined:
    Nov 9, 2009
    Messages:
    1,674
    Likes Received:
    4,825
    Location:
    http://CRAZYFLX.COM
    Home Page:
    Found this script that is free and is better suited for what you're looking for I believe:

    Code:
    http://www.spyka.net/scripts/javascript/simple-banner-rotator
    I'm not affiliated with that at all, I just found it by googling banner rotator script.
     
    • Thanks Thanks x 1
  4. pasenseoso

    pasenseoso Power Member

    Joined:
    Aug 19, 2011
    Messages:
    754
    Likes Received:
    136
    Occupation:
    hachetman
    Location:
    - - P I L I P I N A S - -
    Home Page:
    Thank you so much sir!!!

    rep'd and thanked!!