View Single Post
Old 11-12-2003, 12:03 AM  
spamofon
Confirmed User
 
Join Date: Jun 2003
Location: Toronto
Posts: 2,999
Quote:
Originally posted by Rivux
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.
nice and simple

php is the best
spamofon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote