BOnjour à tous,

je cherche a afficher une vidéo aléatoirement (dans une liste pré établie), dans un calque sur une page HTML.

J'ai essayé de faire une selection aléatoire d'une vidéo en PHP, mais je n'arrive pas a afficher la vidéo dans un calque. Je ne sais pas quoi mettre dans la balise DIV

Voici le code actuel

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<body>
<?php
$nbvideo=3;
 
$nomvideo[1]="<object width="320" height="256"><param name="movie" value="http://www.dailymotion.com/swf/video/xddw53?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/xddw53?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B" width="320" height="256" allowfullscreen="true" allowscriptaccess="always"></embed></object>"
 
$nomvideo[2]="<object width="320" height="179"><param name="movie" value="http://www.dailymotion.com/swf/video/xd76r0?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/xd76r0?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B" width="320" height="179" allowfullscreen="true" allowscriptaccess="always"></embed></object>"
 
$nomvideo[3]="<object width="320" height="240"><param name="movie" value="http://www.dailymotion.com/swf/video/xd4wiy?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/xd4wiy?background=%23171D1B&foreground=%23F7FFFD&highlight=%230EFF00&autoPlay=0&hideInfos=0&width=320&additionalInfos=1&colors=background%3A171D1B%3Bforeground%3AF7FFFD%3Bspecial%3A0EFF00%3B" width="320" height="240" allowfullscreen="true" allowscriptaccess="always"></embed></object>"
 
srand((double)microtime()*1000000);
$affvideo=rand(1,$nbvideo);
?>
<div id="Layer1" style="position:absolute; width:613px; height:302px; z-index:1; left: 9px; top: 75px;"></div>
</body>

Merci d'avance pour vos conseils !