View Single Post
Old 11-12-2003, 12:00 AM  
Rivux
Confirmed User
 
Join Date: May 2001
Location: Ontario, Canada
Posts: 1,026
If you want something super basic, you can use the code below. All you need is a plain text file with the link and image tag in the file, one per line. Call the file ads.txt if you want.

PHP Code:
<a href="somesite.com"><img src="ads/banner.jpg"></a
then whereever you want the banner to be, paste this code in.

PHP Code:
<?
$items = file("ads.txt"); 
$item = rand(0, sizeof($items)-1); 
echo $items[$item];
?>
Like I said, its basic but its functional.
Rivux is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote