Need some help with setting up a small php script to load multiple FLV files (located in a single folder on the server) in a random manner.
I found this piece of code by googling A LOT! :^^:
$flashfiles = intval($params->get( ‘flashfiles’ ));
$flashbase = $params->get( ‘/videos’ );
$quality = $params->get( ‘high’);
$background = $params->get( ‘#FFFFFF’);
$width = $params->get( ‘400’ );
$height = $params->get( ‘400’ );
$top = rand (1,$flashfiles);
$content = <<<EOD
However, there are still some problems -
(1) I get an “eval() error in line 2 message”
(2) The flv files that are loaded randomly has to be renamed as “1.flv”, “2.flv”, “3.flv” etc. This is ok if I only have a few files… but I have tonnes of FLVs and I need the randomization to be independent of file name. I would like to have a random FLV loaded up whether or not they are ‘numbered’ in their filename.
Thanks a lot in advance.