We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,470 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Block access to folder if using direct URL

I have a set of PDF files on our website that the user needs to log in in order to view. The only problem is once they log in and get the URL for them, they can email it to their friends or anyone and they can be viewed by anyone on the web. How would I deny this access using htaccess, javascript, or php?

2
Contributors
1
Reply
16 Hours
Discussion Span
1 Year Ago
Last Updated
2
Views
Bubbleboy
Light Poster
25 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

How about do it with php? check if the user is logged in by detect $_SESSION, then, made the file url unavailable if it is not set.

lps
Posting Whiz in Training
208 posts since Jul 2011
Reputation Points: 13
Solved Threads: 43
Skill Endorsements: 3

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.2832 seconds using 2.66MB