I have searched hi and low.. and not sure how to word my request to get the information I am looking for. I will try to explain and see if anyone here can help.
Let's assume I have a file: -http://www.ottawaphotos.com/myfile1.jpg
Now.. I never want anyone to see the true path for that file.
What I would like is, once a user logs in to the site, image paths are generated via php using X method (how will depend on how this interacts with Mod_Rewrite). The path would have an encrypted filename using some mix of session id, filename and IP of that user.
Example: User #1: Visits site with her IP of 22.214.171.124
Generated links look like this: -http://www.ottawaphotos.com/7ghdjs27384ks83k23.jpg
When the user clicks, Mod_Rewrite would decrypt the 7ghdjs27384ks83k23 (using her IP) into myfile1 and get the file for the user.
User #2: Visits site with hisIP of 126.96.36.199
Generated links look like this: -http://www.ottawaphotos.com/8974jf9dfja89jaa.jpg
When the user clicks, Mod_Rewrite would decrypt the 8974jf9dfja89jaa (using his IP) into myfile1 and get the file for the user.
In essence, this would allow a user to view/dowload a file, but if he sent the link to his buddy, the link would return 404 for the buddy.
Ignoring the obvious he can mail the file to his buddy or what if we have same ip, etc, I am just curious as to if this can be done. I have seen it on other sites. (vk.com for example)
Not sure if that is clear as mud.
Thanks for any help you can provide.