The php file selects banners radomly from a database and prints them. Like so:
//Get number of ads in the database
$query = "SELECT * FROM $table where showw='1'";
$result = MYSQL_QUERY($query);
$number = MYSQL_NUM_ROWS($result);
//Get a random number based on the info
//Fix the sql Number to start with 0
if($number == 0):
print "";
elseif($number == 1):
$randomnumber = 0;
else:
--$number;
srand((double)microtime()*1000000);
$randomnumber = rand(0,$number);
endif;
if ($number > 0)
{
//Get the details for that entry
$id = mysql_result($result,$randomnumber,"id");
$image_url = mysql_result($result,$randomnumber,"image_url");
$url = mysql_result($result,$randomnumber,"url");
$zone = mysql_result($result,$randomnumber,"zone");
$displays_life = mysql_result($result,$randomnumber,"displays_life");
$displays_day = mysql_result($result,$randomnumber,"displays_day");
$dat_type = mysql_result($result,$randomnumber,"dat_type");
$html = mysql_result($result,$randomnumber,"html");
//Generate the HTML
print "<!-- Ad Code Generated by Led-Ads (PHP/MYSQL version .7) http://www.ledscripts.com -->";
if($dat_type == 'image'):
print "<a href=\"$redirect?$id\"><img src=\"$image_url\" border=\"0\"></a>";
elseif($dat_type == 'html'):
print "$html";
else:
print "<a href=\"$redirect?$id\"><img src=\"$image_url\" border=\"0\"></a>";
endif;
print "<!-- End Ad Code -->";
I want include this file in another file which is html not php. If the other file was php then it would be easy:
<? include ("ledads/ad_inc.php"); ?>
But the other file is html so I can't do this
I tried this:
<!# includefile("banner.php") ->
But it didn't work.