Page 1 of 1

videos in "safe directory"

Posted: Thu Nov 01, 2007 10:41 am
by 696020
Hi Everyone,

I'm trying to build a script that will display a .mov that is located in a directory outside my public_html directory for security reasons. I want to use the script to first ensure that the request to view the movie came from a specific http host, and if not, exit before the video is displayed. I also want to avoid people fishing in the directory where the videos are located, hence having outside the public dir.

Any ideas on how to tackle this, or know of any existing scripts that would work?

Posted: Thu Nov 01, 2007 10:50 am
by 696020
I imagine that this will involve using fopen() and fclose() but haven't gotten a real example to work yet.

Posted: Thu Nov 01, 2007 11:10 am
by feyd
readfile() may be of interest.