Rotating banners

wachtn

New Member
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.
 

Maxchen

New Member
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:

kidsko

New Member
i've heard of aion and aoc but never bothered with them too much. how experienced are you with them?
 

Maxchen

New Member
even easier:
PHP:
<?php

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

shuffle($arr);

echo $arr[0];

?>
 
Top