Forum Moderators: coopster
file name¦¦http: //site2.com/folder/link1.wma
file name¦¦http: //site2.com/folder/link2.wma
file name¦¦http: //site2.com/folder/link3.wma
file name¦¦http: //site2.com/folder/link3.wma
file name¦¦http: //site2.com/folder/link3.wma
............................................
all i need to do is update the renamed folder from site 2, but i don't know where to start, and don't know how to do, i hope some one can help me through this.
Thanks very much
Johny
Can't you just store all of your files above the root and use a script to link them? This would probably stop direct linking. You could then use the htaccess on the delivery script, which would be a php file.
$okaysites = array("http://example.com","http://www.example.com");
$ADMIN[url_1] = "http://www.example.com/download.php3?product=";
$ADMIN[url_2] = "http://example.com";
$ADMIN[url_3] = "http://example.com/new";
//////////////////////////////////////////////////////
$reffer = $HTTP_REFERER;
if($reffer) {
$yes = 0;
while(list($domain, $subarray) = each($okaysites)) {
if (ereg("$reffer",$subarray)) {
$yes = 1;
}
}
$theu = "url"."_"."$site";
if ($ADMIN[$theu] AND $yes == 1) {
header("Location: $ADMIN[$theu]/$file");
} else {
header("Location: $ADMIN[defaulturl]");
}
} else {
header("Location: $ADMIN[defaulturl]");
}
?>
----------------------
readme file
1, Open download.php and edit these 3 varibles
$ADMIN[defaulturl] = It will redirect people to this url if they are trying to link to your downloads off there site
@okaysites = sites which can download files off your site
$ADMIN[url_1] = A location to a download folder with some downloads in it
(to add more download locations just put on a new line in the script)
$ADMIN[url_4] = "http://site.com";
$ADMIN[url_5] = "http://site.com";
$ADMIN[url_6] = "http://site.com";
and keep going up a number for as many as you want
2, Upload the script to your website
3, Now just link to the download you want by doing [yoursite.com...]
On that link it has ( site=1 ) that means it calls the download location ( $url_1 )
just change it to what you want so it calls the correct folder
------------------
i tried to change my linking but it doesn't work for me, could you see what the problem with this code?
thanks verry much
John
[edited by: jatar_k at 11:29 pm (utc) on Feb. 14, 2006]
[edit reason] examplified [/edit]