View Single Post
Old 05-10-2003, 04:21 AM  
venturi
Confirmed User
 
Join Date: Aug 2001
Location: An Oasis atop a High Desert Mesa
Posts: 386
Here's a one-time-only freebie from venturi:

The reason you are having problems is that when WinAmp or RealPlayer or WinblozeMediaPlayer fires up and tries to access the movie clip it looks like a type-in (i.e. there is no refering URL), so your .htaccess file 'thinks' it's a hotlinker and blocks the program from accessing the file. The following snippets of code are all you need to grant access to your clips while still blocking hotlinkers/cheaters/etc.

.htaccess file:

RewriteEngine on
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule .*$ http://www.yourdomain.com/cheaters.html

js to set the cookie:

<script>
document . cookie = "id=valid; path=/"
</script>

Instructions:

1) Add the js to the <head> section of the document containing the links to your videos. (Note: remove the spaces in 'document . cookie' )
2) Modify the .htaccess code above to reflect your proper domain and page to redirect hotlinkers and place it into your directory/folder containing the videos you want protected.
3) Upload the files.
4) HUGE PROFITS!

p.s. - you can donate the $10 to your favorite charity (even if that happens to be me )
__________________
I'm not a porn monger. I'm a porn ... STYLIST!
Buildit Cheap, build it Fast, Build it Right. - Pick Two.
venturi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote