View Single Post
Old 02-28-2006, 09:09 AM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
ok heres a simple way , feel free to modify it..

Save the following as index.php and put it in a folder with your videos

Code:
<?php
$mov = $_GET['x'];

echo "<center><embed src=$mov.wmv></embed>";
?>
( if your using mpg/avi videos change the code to mpg/avi in both files)

ok now make a new folder in your main directory, save the following as .htaccess ( modify the url to point to the directory with your videos )
Code:
Options +FollowSymlinks
 RewriteEngine on
 RewriteRule ^(.*)\.wmv http://yoursite.com/videos/index.php?x=$1 [nc]
ok now what this will do is , when you call a video or someone hotlinks a video it will call the video and display it in an html page so you can add advertising and such..

Now keep in mind this doesnt actually prevent hotlinking all it does is rewrite the request to a different folder , so if you try to get http://yourserver.com/protected/video.wmv it would get the video from a different folder and write it into an html file.. the end video is still unprotected , so if someone views source of the html they can simply get the redirected movie url

BUT heres what you do.. you can simply rename the folder with your protected videos then change the .htaccess file to reflect that every so often , you dont have to change any of your links as they will just be redirected to the new folder without any changes on your part
__________________
hatisblack at yahoo.com

Last edited by SmokeyTheBear; 02-28-2006 at 09:10 AM..
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote