> Tous les forumsForum des Webmasters

 aides script videos
Statut du sujet : NON RESOLU Imprimer
 jawas
  Posté le 30/10/2006 @ 15:05  
 Petit astucien

3 Messages
bonjour , voici un script php pour lire des videos wmv , mpg qui se trouve dans un repertoire nommee video a chaque video transferer il cree un menu avec le nom de la video ,le souci c'est le menu je prefere un menu deroulant mais je sait pas le coder , l'autres souci c'est qu'il n'affiche pas les videos ne les lit pas , aider moi merci voici le code php pour lire les videos dans le fichiers VIDEOS du site :
<?php //----------------------------------------------------------------------------------------- // the variables you have to set //----------------------------------------------------------------------------------------- // width of the video $width = 320; // height of the video $height = 240; //----------------------------------------------------------------------------------------- // rest of the php part //----------------------------------------------------------------------------------------- // autoscanning the wmv directory @$d = dir("videos"); if ($d) { while($entry=$d->read()) { $entry = preg_replace("/ /","%20",$entry); $pos = strpos(strtolower($entry), ".wmv"); if (!($pos === false)) { $files[] = "videos/".$entry; } } $d->close(); } // getting the file from the url if ($_GET['file']) { $file = $_GET['file']; } else { $file = 1; } // extracting the name of the video $p1 = strrpos($files[$file-1],"/") + 1; $p2 = strpos($files[$file-1],".wmv"); $name = substr($files[$file-1],$p1,($p2-$p1)); //----------------------------------------------------------------------------------------- // displaying the html page //----------------------------------------------------------------------------------------- ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>wmv Player Playlist</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- Stye Sheet --> <style type="text/css"> body { background-color: #eee66e; font:10px/16px verdana; color: black; } a { color: black; } a:hover { color: #cc0000; } div { margin:20px; } h1 { margin-left:15px; } </style> </head> <body> <!-- the wmv movie name --> <div id="name"> <p align="center"><b><?=$name?></b></p> </div> <!-- the wmvplayer --> <div id="player"> <p align="center"> <center> </br><table border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td VALIGN="middle" align="center"> <p align="center"><object id='MediaPlayer' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' wid­th=349 heig­ht=200 standby="Loading..."> <param name='AudioStream' value='-1'> <param name='AutoSize' value='0'> <param name='AutoStart' value='true'> <param name='AllowScan' value='-1'> <param name='AllowChangeDisplaySize' value='-1'> <param name='AutoRewind' value='true'> <param name='ClickToPlay' value='0'> <param name='DisplayBackColor' value='3'> <param name='DisplayMode' value='-1'> <param name='DisplaySize' value='0'> <param name='Enabled' value='-1'> <param name='PlayCount' value='1'> <param name='PreviewMode' value='1'> <param name='ShowCaptioning' value='0'> <param name='ShowControls' value='true'> <param name='ShowAudioControls' value='1'> <param name='TransparentAtStart' value='0'> <param name='Volume' value='5'> <param name='Filename' value="<?=$­files[$­file-1]?>" > <!--NETSCAPE PLUG-IN STARTS HERE--> <div style="text-align: center;"><embed type='application/x-mplayer2' src="<?=$­files[$­file-1]?>" name='NSPlay' pluginspage='http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin' showcontrols=1 showdisplay=0 showstatusbar=0 autostart=1 loop=1 wid­th=349 heig­ht=200 > </embed> </object> </td> </tr> </table> <p> </div> <!-- the nwmvgation --> <div id="nav"> <p align="center"><b> <ul> <? // php loop for printing all the links for ($i=0; $i<=sizeof($files)-1; $i++) { $p1 = strrpos($files[$i],"/") + 1; $p2 = strpos($files[$i],".wmv"); $name = substr($files[$i],$p1,($p2-$p1)); echo " <li><a href=\"wmvplayer.php?file=".($i+1)."\">".$name."</a></li>\n"; } ?> </ul> </b></p> </div> </body> </html>
[smile]
 Afficher le profil de jawasEnvoyer un message privé à jawas
 
 
Publicité
 olivier7500  Posté le 03/11/2006 à 12:09  
Petit astucien

504 Messages

salut,

voila ton script:

http://www.phproduction.com/videos/wmvplayer.php

A++

Oliv



Modifié par olivier7500 le 03/11/2006 12:41
Afficher le profil de olivier7500 Voir la configuration de olivier7500Envoyer un message privé à olivier7500
  Revenir en haut de la page
 olivier7500  Posté le 06/11/2006 à 21:39  
Petit astucien

504 Messages
olivier7500 a écrit :

salut,

voila ton script:

http://www.phproduction.com/videos/wmvplayer.php

A++

Oliv


Allo Satisfait ?

Afficher le profil de olivier7500 Voir la configuration de olivier7500Envoyer un message privé à olivier7500
  Revenir en haut de la page
 jawas  Posté le 06/11/2006 à 22:05  
Petit astucien

3 Messages
c'est Superbe un grand merci !!!!
Afficher le profil de jawasEnvoyer un message privé à jawas
 Revenir en haut de la page
 olivier7500  Posté le 06/11/2006 à 22:06  
Petit astucien

504 Messages

à ton service !

Oliv

Afficher le profil de olivier7500 Voir la configuration de olivier7500Envoyer un message privé à olivier7500
  Revenir en haut de la page
Haut de la page 
Inscrivez-vous !
- Posez vos questions

- Résolvez vos problèmes

- Aidez les autres

- Participez et créez vos discussions

- Dialoguez en privé avec d'autres membres

- Suivez vos sujets préférés

- Affichez les signatures des membres

TOUT EST GRATUIT !

Je crée mon compte



Vous avez besoin d'aide ?
Des centaines d'experts sont à votre disposition sur les forums PC Astuces pour vous aider gratuitement, 24h/24, 7j/7.

Les derniers sujets résolus !
 

 > Tous les forumsForum des Webmasters

 
Forum PC Astuces© 1997-2008 WebastucesAller en haut de la page