Hello ppl,
I tried a script that print(); a random image, I needed for swf files and I modified like this:
<?php
$imgpath = "poze/";
$handle = opendir( "$imgpath" );
$imgArray = array();
while($file = readdir($handle))
{
if( $file != "." && $file != ".." )
{
array_push( $imgArray, $file );
}
}
closedir( $handle );
mt_srand( (double)microtime( ) * 1000000 );
$randval = mt_rand( 0, sizeof( $imgArray ) - 1 );
//this line I insert it
print ("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ID=\"$imgpath" .
$imgArray[ $randval ] ."><PARAM NAME=movie VALUE=\"$imgpath" . $imgArray[ $randval ] ."> <PARAM NAME=quality
VALUE=high> <EMBED src=\"$imgpath" . $imgArray[ $randval ] . " width=\"415\" height=\"60\" quality=\"high\"
swLiveConnect=\"FALSE\" NAME=\"$imgpath" . $imgArray[ $randval ] ." TYPE=\"application/x-shockwave-flash\"
PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" border=\"0\"></EMBED></OBJECT>");
//next line is the original
//print( "<IMG SRC=\"$imgpath/" . $imgArray[ $randval ] . "\">" );
?>
I made the changes I needed for swf file instead images, but is still not working, Can somebody tell me if this is
working only for images?? or I made something wrong there?
10x and see ya.