Web Hosting Talk







View Full Version : Anti Leech protection


UrlGuy
06-14-2005, 04:29 PM
Hi,

I plan to use with my website a script to be able to place the downloadable files behind my public_html directory which is unreadable by the public. I use PHP for this.
I will use the switch statement. So the link for for example Winamp would appear as domain.com/dl.php?file=winamp, where the switch statement in dl.php for winamp would maybe include some command for getting the file for download from the unreadable directory. Anyone know what command I could use? Or should I just use Location : /home/user/file.zip ??

Thanks in advance,
~Urlguy

znarf
06-14-2005, 04:51 PM
Location : /home/user/file.zip won't work. You could use readfile('/home/user/file.zip'), with the proper content-type set.

UrlGuy
06-14-2005, 05:04 PM
Thanks man:)

PlanetWebHost
06-14-2005, 08:34 PM
there was another thread today about this same thing.
http://www.webhostingtalk.com/showthread.php?s=&threadid=415133