Security of folder

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
keithdixon
Forum Newbie
Posts: 1
Joined: Sun Dec 06, 2009 4:08 am

Security of folder

Post by keithdixon »

before i start, i am newish to php and am learning by the day.

I have a site where i store documents in pdf form for customers and currently these pdf files are within a public folder. (NOT GOOD)

i have set up htaccess to stop anyone directing http viewing directory listings of the folder but cannot stop someone pointing directly at the pdf file.

The site currently displays the pdf's within an iframe after copying the origianal pdf to a temp directory (to mask where the pdf came from)

is there a way to fully lock down the folder (http://www.webaddress.com/customer_files/customer 1 http://www.webaddress.com/customer_files/customer 2 etc?)

is it possible to password protect all files to stop anyone directing a browser to the pdf? and if so can the script within my site automatically enter the username/password to access the pdf?
Post Reply