script for automatically changing videos

I would like to make every day a different video show automatically in an HTML block.
The code for the videos I'd saved in a database, the question now is what do I do to make this work then? How should the script be for this?

thanks ebelix

Quote · 9 Aug 2010

I got it:

 

// YouTube - Random Video Script by www.dug-portal.com

// $hoehe = "344"; // Video Hoehe
// $breite = "425"; // Video Breite

$hoehe = "385"; // Video Hoehe
$breite = "640"; // Video Breite
function ytr() {

$videos = array(
0 => 'm1JnPa7DUtI',
1 => '4zDkTLhmGfY',
2 => 'wOc2Jg18HNk',
3 => 'Fbbc5Ddgp0c',
4 => 'sMiUQXHftH0',
5 => 'QavaTOMzvEI',
6 => 'GhOX0B4B-4I',
7 => 'suXxYE3LFr0',
8 => 'ztlHwVYMnN4',
9 => 'FQl3iInVd0Y',
10 => 'jmoIftISIRk',
11 => 'DdZXp0Tq6Jk');

srand ((double) microtime() * 1000000);
$video = rand(0,count($videos)-1);

$ytrv = ($videos[$video]);
return $ytrv;
}

echo '<object width="'.$breite.'" height="'.$hoehe.'"><param value="http://www.youtube.com/v/'.ytr().'" name="movie" /><param value="true" name="allowFullScreen" /><param value="always" name="allowscriptaccess" /><embed allowscriptaccess="always" width="'.$breite.'" src="http://www.youtube.com/v/'.ytr().'" allowfullscreen="true" height="'.$hoehe.'" type="application/x-shockwave-flash"></embed></object>';

Quote · 19 Aug 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.