php pdf protection


#1

Ok first of all I just started learning php today. I created php files to protect a page with usernames and passwords. However I am not sure how to protect pdf documents from being directly accessed if you have the exact file path. Any suggestions? Thanks so much

~Brad


#2

Well have you considered using the .htacess file and the authentication it can provide?
See http://httpd.apache.org/docs/2.0/howto/htaccess.html and there is an Authentication Example there.