Free Adult Tube-Video Script Forum

Full Version: Rotating Ads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since everyone wants rotating banners, here is a simple way to get them...

how to install:

1. create a file in your root folder called rotatingads.txt
2. place this code, either in your Free HTML Area or your themes template (if you know how) where you wish your banner to display...

$filename = '';
$how_many_to_show = 1;
if ($fileContents = file($filename)) {
for ($i = 0; $i < $how_many_to_show; $i++) {
   $myvariable = ($fileContents[$i]);
} else {
die('Could not get contents of: ' . $filename);
echo $myvariable;

in the code i have provided, you will have to put your url, where it says

rotatingads.txt explained:
this is important, so make sure you understand...
each ad code, must be on one line each...
ad code 1
ad code 2
ad code 3

added bonus:
depending where you want your ads to display, and what size your ads are...
there is an included variable in the code "$how_many_to_show"...
this will be the number of ads your script shows at any one time...
so, if your using this code in your sidebar and wish to show two random ads, one under the other...
set it to 2 and make sure you have a < br > (with no spaces) at the end of each ad code line...

simple as that...
Reference URL's