Re: [PHP] protecting video files
> which works fine until I add this at the top > > if($HTTP_REFERER != "http://www.hardcorehosting.com/video/test.html";) > { > exit(); > } > Check to make sure $HTTP_REFERER is being set. Just create another script that has something like: Then create a link to this new script from the test.html page that you're trying to show the movie from. Good luck, Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] protecting video files
On Fri, 11 May 2001 17:28:25 -0500, WebMaster ([EMAIL PROTECTED]) wrote: >I did :( went character by character and could find not extra spaces. > >At 06:16 PM 5/11/01 -0400, Michael Kimsal wrote: >>Check for extraneous spaces in your script. >> >>Tim Schulte wrote: >> >> > Hi there - >> > >> > I am having some weird problems here. I am try to write a >>script that >> > will check to see where a movie file is being called from. I >>want to define >> > which web page I will allow a movie to be called from, and block >>all >> others. >> > The script so far looks like this: >> > >> > The file gets called like this >> > http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov >> > >> > playmovie.php === >> > > > header("Content-type: video/quicktime"); >> > $file=fopen($movie, "r"); >> > fpassthru($file); >> > ?> some suggestions: 1) use "rb" instead of "r" for binary files 2) you forgot to fclose the file handle. 3) try readfile() instead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] protecting video files
I did :( went character by character and could find not extra spaces. At 06:16 PM 5/11/01 -0400, Michael Kimsal wrote: >Check for extraneous spaces in your script. > >Tim Schulte wrote: > > > Hi there - > > > > I am having some weird problems here. I am try to write a script that > > will check to see where a movie file is being called from. I want to define > > which web page I will allow a movie to be called from, and block all > others. > > The script so far looks like this: > > > > The file gets called like this > > http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov > > > > playmovie.php === > > > header("Content-type: video/quicktime"); > > $file=fopen($movie, "r"); > > fpassthru($file); > > ?> > > = end script === > > > > which works fine until I add this at the top > > > > if($HTTP_REFERER != "http://www.hardcorehosting.com/video/test.html";) > > { > > exit(); > > } > > > > to check and see where the page is being called from. It then gives me a > > broken image. I've checked for space's and can't see what I'm doing wrong > > :( Any suggestions ?? Thanks. > > > > Tim Schulte > > [EMAIL PROTECTED] > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] protecting video files
Check for extraneous spaces in your script. Tim Schulte wrote: > Hi there - > > I am having some weird problems here. I am try to write a script that > will check to see where a movie file is being called from. I want to define > which web page I will allow a movie to be called from, and block all others. > The script so far looks like this: > > The file gets called like this > http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov > > playmovie.php === > header("Content-type: video/quicktime"); > $file=fopen($movie, "r"); > fpassthru($file); > ?> > = end script === > > which works fine until I add this at the top > > if($HTTP_REFERER != "http://www.hardcorehosting.com/video/test.html";) > { > exit(); > } > > to check and see where the page is being called from. It then gives me a > broken image. I've checked for space's and can't see what I'm doing wrong > :( Any suggestions ?? Thanks. > > Tim Schulte > [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] protecting video files
Hi there - I am having some weird problems here. I am try to write a script that will check to see where a movie file is being called from. I want to define which web page I will allow a movie to be called from, and block all others. The script so far looks like this: The file gets called like this http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov playmovie.php === = end script === which works fine until I add this at the top if($HTTP_REFERER != "http://www.hardcorehosting.com/video/test.html";) { exit(); } to check and see where the page is being called from. It then gives me a broken image. I've checked for space's and can't see what I'm doing wrong :( Any suggestions ?? Thanks. Tim Schulte [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]