Need rotational banner's Script

Discussion in 'JavaScript' started by cruxabhi, Jan 12, 2009.

  1. #1
    Hi all,

    I got ads from 2 different ads provider, now I want to show both of them into rotational basis on my website.

    Like I created 2 asp file eg. ad1.asp and ads2.asp

    so now I just want to write a code into my website's homapage and call the both file in rotational basis.

    can anyone provide me the script like that


    thanks in advance
     
    cruxabhi, Jan 12, 2009 IP
  2. DomainCo.US

    DomainCo.US Well-Known Member

    Messages:
    2,124
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    100
  3. cruxabhi

    cruxabhi Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,
    I want to rotate 2 different asp pages.

    like

    if someone came to the page then the ads1.asp called and if he refreshed again then ads2.asp will be called

    In that asp file I will only put the script code like

    <table>
    <tr>
    <td>Code of advertisment 1</td>

    </tr>
    </table>

    and in other ads2.asp will be something like this

    <table>
    <tr>
    <td>Code of advertisment 2</td>

    </tr>
    </table>


    so the both ad will be visible in rotationally basis and I will include that both in a single table with a script.
     
    cruxabhi, Jan 12, 2009 IP
  4. budster

    budster Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    budster, Jan 13, 2009 IP
  5. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #5
    isnt that against the ad companies terms of service?
     
    crath, Jan 13, 2009 IP
  6. manijifera

    manijifera Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    assume your filename is 1.phh and 2.phh

    <?php
    
    $add = rand(1,2); 
    
    include ("$add.php");
    
    ?>
    PHP:
    this works!
    you done it!
     
    manijifera, Jan 14, 2009 IP
  7. cruxabhi

    cruxabhi Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yeah it is but I just want to rotate my own banners.. Like banner1 is showing one topic of my site another is showing another topic of site... Just to keep the visitor to see those interesting and happening page also.. and it's also help me to get the visitor on the page I want where visitor are not coming from search engine so... I hope I am clear ... sorry for bad english
     
    cruxabhi, May 31, 2010 IP