View Single Post
Old 02-09-2007, 01:47 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
ok heres how you modify it to do multiple filetypes

the htacess should look like this

notice how it has a line for wmv and mpg, just copy that line and modify for the filetypes you need to add

Code:
rewriteengine on 
rewriterule ^(.*)\.wmv$ http://www.yoursite.com/protected/?end=wmv&in=$1 [nc]
 rewriterule ^(.*)\.mpg$ http://www.yoursite.com/protected/?end=mpg&in=$1 [nc]
rewriterule ^(.*)\.jpg$ http://www.yoursite.com/protected/img.php?in=$1 [nc]
then in the index.php

Code:
<?php
$in = $_GET['in'];
$end = $_GET['end'];
$sip = getenv("REMOTE_ADDR");
$fol = "log.dat";
$sc = file_get_contents($fol);
if (preg_match ("/$sip/", $sc)) {
header("Location: http://yourserver.com/protected/secret/$in.$end");
}  else
{
header("Location: http://yourserver.com/protected/x.wmv");
}
?>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote