Rotating banners

Discussion in 'Scripts' started by wachtn, Jun 10, 2009.

to remove all ads.
  1. wachtn

    wachtn New Member

    Messages:
    107
    I have several different banners (advertisements) that I to rotate every time a page is loaded. Can yall suggest which script I should look at for doing this?

    Thank you.
     
  2. digitalextreme

    digitalextreme New Member

    Messages:
    11
    Just do a search, most coding is the same.
     
  3. ian

    ian Administrator Staff Member

    Messages:
    2,153
  4. Maxchen

    Maxchen New Member

    Messages:
    22
    php

    its so simply!
    first, create php file, for example, banner.php that contain this code:
    PHP:
    <?php 

    $quot_arr
    =array(

    'Your advertising Num.1',

    'Your advertising Num.2',

    'Your advertising Num.3',

    'Your advertising Num.4',

    'Your advertising Num.5',

    );
    $quot_rand=rand(0,count($quot_arr)-1);

    echo 
    ''.$quot_arr[$quot_rand].'';

    ?>
    -- this will show random ads or banners.
    upload this file to some place on your web hosting.

    Next step, incert php code below on your web page by your needs:
    PHP:
    <?php include"banner.php";?>
    and.......
    be happy :)
     
    Last edited: Jul 26, 2009
  5. kidsko

    kidsko New Member

    Messages:
    10
    i've heard of aion and aoc but never bothered with them too much. how experienced are you with them?
     
  6. mrandrei

    mrandrei New Member

    Messages:
    334
  7. muqtada123

    muqtada123 Banned

    Messages:
    11
    i got three banners but they got stuck in mozilla but working fine in IE, any suggestion
     
  8. ROcketRO

    ROcketRO New Member

    Messages:
    3
    thanks Maxchen, i needed that.
     
  9. Maxchen

    Maxchen New Member

    Messages:
    22
    even easier:
    PHP:
    <?php

    $arr 
    = array('test1''test2''test3');

    shuffle($arr);

    echo 
    $arr[0];

    ?>
     
  10. eyewebmaster12

    eyewebmaster12 New Member

    Messages:
    9
    wooooow very useful info.
    thanks for sharing.
     
  11. orangecopper

    orangecopper New Member

    Messages:
    327
    woo Excellent turn arrnd on a question...

    Cheers Guys !
    josh
     

Share This Page