View Single Post
Old 05-09-2007, 11:00 AM  
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
ad.php:

<?php
$ads = file('ads.txt');
echo $ads[array_rand($ads)];
?>

ads.txt would contain your iframe / banner html. One entry per line, no blank lines.

ie:

<iframe src="http://www.domain.com/iframe_1.html"...></iframe>
<iframe src="http://www.domain.com/iframe_2.html"...></iframe>

etc.

Then just include it <?php include("ad.php"); ?> where you want it.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote