This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
I would like to create a web site with many images. But I would like to protect against direct access to images, e.g. direct links to images without visiting the web site.
What is the preferred way to do this? And what are the alternatives with Pros and cons?
I have some ideas (I don t know if they are possible):
- File permissions
- PHP Sessions
- Temporary file names or URLs
- HTTP Redirection?
Maybe this isn t practiced on many web sites? E.g. I tried to access a private photo on Facebook without beeing logged in, but I could still visit the photo.
The platform will probably be a Ubuntu machine with NginX and PHP.