If you have php, this is what i use:
PHP Code:
<?php
$banners_dat = "banners/banners.txt";
function PrintBanner() {
global $banners_dat;
$arry = @file($banners_dat);
if( !isset($arry) || !$arry || !is_array($arry) )
return false;
list($img, $url, $alt, $status) = explode("|", $arry[rand(0,sizeof($arry)-1)]);
$focus=$mouseover="\"window.status='Click Here'; return true;\"";
$mouseout="\"window.status='Done'; return true;\"";
return "<a
href=\"$url\"
OnMouseOver=$mouseover
OnFocus=$focus
OnMouseOut=$mouseout><img
src=\"$img\"
border=\"1\"
alt=\"[$alt]\"></a>\n";
}
print PrintBanner();
?>
And the text file with the data..
image1.gif|
http://www.url1.com|description 1
image2.gif|
http://www.url2.com|description 2
image3.gif|
http://www.url3.com|description 3
and so on. don't leave any blank lines, and that should work fine