Movie Pass

By

Porn Meister

Editors Note: A topic of discussion during this weeks record posting blitz, had to do with protecting movies from hotlinking. The below solution was researched by Porn Meister and he shared the following with the board. We felt it was a worthy tool to have in your arsenal. Enjoy!

Some of the htaccess information people are mentioning is fine for images, but for movies it's quite different.

Media Player closes the connection, then reopens it, sending blank referrer information. That's why standard image hotlink protection is fairly useless ;)

I was thinking of chaining some rewrite rules, but El Presidente sent a link that had a nice alternative. You set a Cookie from your referring page, and having the htaccess protecting the movies examine the cookie. If it's valid, then allow. If not, deny.

<SCRIPT LANGUAGE="javascript"> // Calculate the expiration date var expires = new Date(); expires.setTime(expires. getTime() + 6 * 60 * 60 * 1000); document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString(); </SCRIPT>

Put the movies in their own subdirectory and put this .htaccess in that subdirectory with the movies:

RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*your- domain.com/ [NC] RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$) RewriteRule /* http://% {HTTP_HOST}/ [R,L]

"The prostitue is the only honest women left in America"
Ti-Grace Atkinson
Previous PageNext Page

©2002 VNWR. All rights reserved.