doughuffman11181 posted in macromedia.dreamweaver.appdev
> How do I set up a folder in my webroot folder to save my
flv
> video's in and the video's show in list form on my
website where I
> can just log onto my website, choose a video from the
list, click
> it, and be directed to another page that will display
the video in
> progresive download?
Got PHP?
If so, here is a very basic example you could save as
index.php in the
folder that contains the .flv files (beware of word wrap).
Oops. I just realized you asked for "list form", but I
already did
this as a table. Oh well, it should help you get started.
<?php
echo "<html><head><title>File
list</title></head><body>\n";
echo "<table border=1 cellspacing=0
cellpadding=2><tr><th>Filename</th><th>Size</th><th> </th></tr>\n";
foreach (glob("*.flv") as $filename) {
$size = filesize($filename);
printf('<tr><td><a
href="%s">%s</a></td><td>%2s</td>',$filename,$filename,
$size);
printf('<td><a
href="player.php?filename=%2s">View</a></td></tr>'
."\n",$filename, $filename);
}
echo "</table></body></html>";
?>
The above will allow you to click the filename to download
the video
or use a View link to player.php. player.php is a page with
your
Flash video player and $_GET['filename'] will contain the
filename.
Assuming you're using one of the CS3 or CS4 FLVPlayers, you
should be
able to replace all instances of:
&streamName=someVideoFilename>
with:
&streamName=<?php echo $filename;?>
You /might/ need to strip off the ".flv" from the filename in
player.php. If so, pathinfo() can provide the basename.
I leave security considerations and sanitization of user
input
($_GET) to you.
--
Mark A. Boyd
Keep-On-Learnin' :)