Page 1 of 1

play QT and WMP files stored outside of webroot

Posted: Tue Nov 04, 2008 4:16 pm
by reallynew2php
My webroot is:

/var/www/html/mywebsite.com/html

I want to store my QuickTime and Windows Media Player files in:

/var/www/html/mywebsite.com/files

so that someone can not just type the address of the movie in the browser and be able to watch the video. The problem is when I move the files to files directory I can no longer just provide the address to the html. I was hoping since PHP is on the server side that it could somehow read the QuickTime and Windows Media Player files and return the contents of the file to the embedded player.

Does that make sense? I've been searching the web and have come up empty for the most part. I did find something that I think is similar about Flash videos, but it doesn't help me much.

http://www.jeroenwijering.com/?thread=9153

Thanks a lot!

Re: play QT and WMP files stored outside of webroot

Posted: Tue Nov 04, 2008 4:27 pm
by Jade
You should be able to access the files in php by doing something like ../files/moviefile inside of pages in your html directory. The ../ will move up to your root directory, then back down to your files directory.

Re: play QT and WMP files stored outside of webroot

Posted: Thu Nov 06, 2008 2:29 pm
by reallynew2php
Unfortunately that doesn't work.