View Single Post
Old 10-19-2008, 01:28 AM  
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
Quote:
Originally Posted by Phil21 View Post
You can use referral blocking (mod_rewrite type of stuff) and it's generally "good enough" for a casual deterrent.

However, many browsers do *not* send a refferer header string for flash movie content, thus you cannot truly rely on it. Most sites won't bother hotlinking though, when 30-60% or whatever traffic doesn't get a good pageload.

The best way to do it is via secure download tokens, like lighttpd's mod_securedownload and about 5,000 others. Basically, you have your PHP code generate a link to the movie with a hash, using a shared secret. Your webserver then checks to ensure that this hash is valid prior to serving the file in question.

If both the PHP and the static files (.flv) are hosted on the same webserver instance, you can use a myriad of off-the-shelf anti-hotlink products. Nearly anything on the market.

If they are hosted elsewhere, most products will no longer work - and you'll want something like the hash sharing mechanism outlined above.

As for PHP "streaming" - yeah, if you want to do about 1/100th of what the server can actually push, sure Running static files through PHP is a horrible idea, unless you simply don't have enough traffic for it to matter and it's the easiest solution for your particular developers.

Regards,

-Phil
Great post Phil
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote