swf banner rotate every X sec without refresh
Posted: Tue Jun 19, 2007 4:11 am
hello
I try to get all banners - swf from a dir and put them into array now i need to push the array into i think javascript that will dislpay difrent swf every X sec
this is the PHP script to get all swf into array
<?
$imglist='';
$img_folder = "banner/gil/";
mt_srand((double)microtime()*1000);
$imgs = dir($img_folder);
//read all files from the directory, checks if are images and ads them to a list (see below how to display flash banners)
while ($file = $imgs->read()) {
if (eregi("swf", $file))
$imglist .= "$file ";
} closedir($imgs->handle);
//put all images into an arry
$imglist = explode(" ", $imglist);
$no = sizeof($imglist);
?>
I try to get all banners - swf from a dir and put them into array now i need to push the array into i think javascript that will dislpay difrent swf every X sec
this is the PHP script to get all swf into array
<?
$imglist='';
$img_folder = "banner/gil/";
mt_srand((double)microtime()*1000);
$imgs = dir($img_folder);
//read all files from the directory, checks if are images and ads them to a list (see below how to display flash banners)
while ($file = $imgs->read()) {
if (eregi("swf", $file))
$imglist .= "$file ";
} closedir($imgs->handle);
//put all images into an arry
$imglist = explode(" ", $imglist);
$no = sizeof($imglist);
?>