how would i go about the following
Moderator: General Moderators
how would i go about the following
i need to protect my downloads from leechers, any ideas on the best way to do this in php?
thanks in advance
thanks in advance
i think he wants to hide his download url volka....
if so then make a page with
then link to it like
um...is this the best way to do it?
if so then make a page with
Code: Select all
<?php
if(IsSet($file))
{
header("location: path/to/download/folder/$file");
}
else
{
echo "what do you want?";
}
?>Code: Select all
<a href="page.php?file=filename.ext">Download</a>header('Location ....'); will lead to a 302 redirect (at least under apache) and the browser (at least IE
) recognizes this and will store the new url.
once again: I'm not getting tired of pointing to this article Prevent Hotlinking with Apache Server Rewrite Module
once again: I'm not getting tired of pointing to this article Prevent Hotlinking with Apache Server Rewrite Module
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
one more thing
with the apache module thingy, will i have to write a htaccess file for each file i want to protect.
thanks
thanks
since there can be only one .htaccess per directory the answer must be: no 
http://httpd.apache.org/docs/
http://httpd.apache.org/docs/