View Single Post
Old 04-11-2002, 07:05 AM  
spanky
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 231
howdy do,
My first post but I don't really have anything to say other than chodadog, this sucker below works for me.
PHP Code:
<?php

$banners_dat 
"./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='$status'; return true;\"";
    
$mouseout="\"window.status='Done'; return true;\"";

    return 
"<a 
        href=\"
$url\" 
        target=_blank 
        OnMouseOver=
$mouseover 
        OnFocus=
$focus 
        OnMouseOut=
$mouseout><img 
                    src=\"
$img\" 
                    width=\"468\" 
                    height=\"60\" 
                    border=\"0\" 
                    alt=\"[
$alt]\"></a>\n";
}

print 
PrintBanner();
?>
cheers
spanky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote