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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…