protect WMV files from being downloaded?
My site lets ppl stream videos online. So I link them to an .asx file which redirects to the .wmv file. Now I don't want anyone to directly download my .wmv file. Is there any script I can install that can protect this file from being downloaded yet ppl can still stream it?
kb posted this at 00:31 — 5th August 2004.
He has: 1,380 posts
Joined: Feb 2002
one thing you can do is block direct linking to the file, and hide the folder (directory) under many other ones...see http://alistapart.com/articles/hotlinking/ to get an idea...it would work in your case. i'll even get you started:
when they click on the link, it goes to a page like mysite.com/play.php?file=fun.asx
and play.php looks like this:
<?php
header(\"Content-type: text/html\");
header(\"Cache-Control: no-store, no-cache,
must-revalidate\");
header(\"Cache-Control: post-check=0, pre-check=0\",
false);
header(\"Pragma: no-cache\");
$file = strip_tags($_GET['file'] );
echo \"[embed file here]\";
?>
Brian911 posted this at 22:32 — 5th August 2004.
He has: 14 posts
Joined: Aug 2004
I only had to deal with streaming videos once but in my research I found out that many versions of MS Windows Media Player do not pass a http referrer correctly so I could not use .htaccess to protect them.
However there are many scripts on the web which, according to the producer's description, can even protect video files... a google or hotscripts search should have some results.
Web Hosting Directory
kb posted this at 02:23 — 7th August 2004.
He has: 1,380 posts
Joined: Feb 2002
Well if you EMBED (like i originally said) then you don't have to worry about them reading correctly...and I wasn't talking about .hitaccess to protect, read my post.
I gave a working, fine example.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.