So here's what I would like to do, not sure if it's possible or not but any help would be appreciated. I have a butt ton of movies on my computer(yes I own them all, just using computer hooked to tv because it's easier than switching dvd's), and I set up IIS with php. I would like to <embed> the video files from a folder on a page so that I can go anywhere and play them on my laptop, regardless where in the world I am. I have this so far...
Code: Select all
<?php
$dir = realpath('videos');
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$ext = substr(strrchr($file, '.'), 1);
if($ext == "avi") {
echo "<object data='videos/$file' type='video/avi' /><br />";
} else {}
}
closedir($dh);
}
}
?>
it's showing the right path when I right click on page and select view source, but the video will not play. when windows media player pops up, it says it cant play the file. I right click on the name of the file in the playlist and it shows the path as "
http://localhost/videos/video.avi" so I am not sure why they are not playing. Any ideas? please? Also if you think this is completely unfeasable for a regular sized (700mb) video file, please let me know.