View Single Post
Old 06-12-2007, 02:11 PM  
MissFireCrotch
Confirmed User
 
MissFireCrotch's Avatar
 
Join Date: Jun 2007
Posts: 187
ok i have my player working with stream.php?file=video.flv This works and well. The files are located outside my web root so only this script will be able to access them. But how do i protect this script so that people dont just put that in the url line and are able to dl my movie?

i have tried:
Code:
if (!$_SERVER['HTTP_REFERER']){
print "This page can't be accessed directly. Please click back to start over.";
 }
and

Code:
if (!defined("Something_was_defined_on_previous_page"))
{
   die ("Don't waste your time trying to access this file");
}
and neither one works. stream.php will only respond with what it should be responding when the script is accessed directly on the url.
__________________
Need some web dev? Contact ME
ICQ - 366621126
MissFireCrotch is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook