play QT and WMP files stored outside of webroot

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
reallynew2php
Forum Newbie
Posts: 3
Joined: Mon Nov 03, 2008 12:23 pm

play QT and WMP files stored outside of webroot

Post 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!
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: play QT and WMP files stored outside of webroot

Post 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.
reallynew2php
Forum Newbie
Posts: 3
Joined: Mon Nov 03, 2008 12:23 pm

Re: play QT and WMP files stored outside of webroot

Post by reallynew2php »

Unfortunately that doesn't work.
Post Reply