ffevo
04-05-2006, 06:31 AM
I have an ad rotator script that uses one file called ad_rotator.php and another text file called banner_ads.txt.
The ad_rotator.php contents are as follows:
<center>
<?php
$fcontents = join ('', file ('banner_ads.txt'));
$s_con = split("~",$fcontents);
$banner_no = rand(0,(count($s_con)-1));
echo $s_con[$banner_no];
?>
</center>
The banner_ads.txt would go something like this:
ad_1 html here. this is my first ad
~
ad_2 html here. this is my first ad
~
I want to run the ads on EVERY page of my forums in a certain spot. The right side of everything to be exact. I already kno wexactly what tabl ei want to run this in so that is not the issue. I just need to know how to run this script in that table. Can anyone help me?
The ad_rotator.php contents are as follows:
<center>
<?php
$fcontents = join ('', file ('banner_ads.txt'));
$s_con = split("~",$fcontents);
$banner_no = rand(0,(count($s_con)-1));
echo $s_con[$banner_no];
?>
</center>
The banner_ads.txt would go something like this:
ad_1 html here. this is my first ad
~
ad_2 html here. this is my first ad
~
I want to run the ads on EVERY page of my forums in a certain spot. The right side of everything to be exact. I already kno wexactly what tabl ei want to run this in so that is not the issue. I just need to know how to run this script in that table. Can anyone help me?