php pdf protection


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



Well have you considered using the .htacess file and the authentication it can provide?
See and there is an Authentication Example there.