Page 1 of 1

Protecting a folder?

Posted: Wed Aug 25, 2004 3:07 pm
by pylon42
Horribly new.

Can PHP do something like protect a directory so that people can't link to files in it? But links within the site to the files still function properly?

Or am I way off?

I have a directory full of .pdf files that people pay to access... but I can't seem to keep people from just downloading them directly...

thanks

Posted: Wed Aug 25, 2004 3:12 pm
by Draco_03
Well err
In my opinion, you could create a log in for your users, and upon download you check if the user trying to download is actually loged in and has the right to do so.

And use .htaccess to lock you r folder up, and give access to thoses who log only.