Hi every one,
I try to explore this by myself without any success. Greatly thank if you can figure it out for me. Sorry if there may have something similar to my question in this forum. I am new here.
OK, the question is, how could you control permission of users before giving them the file (like PDF, jpg). Look unclear? I am not asking about requesting a php file, since we can easily control permission of users and redirect them if they are not login.
More details, assume that the website has a group name A. Group A uploads a file, say example.pdf in the server. I want ONLY them have permission to view and download this file (anyother people can’t see this, even though they may have the actually link).
Even more detail, assume that the address of the file in server is
[url]http://www.myserver.com/group/exampe.pdf
As default, anyone can request this file (since it is PDF – NOT PHP so that I can control/check visitor’s permission). I cant not manually cmod each file in the server, of course. I want ONLY group A can download the file!
Could you PHP expert help me solve this problem? I actually try by myself a lot but I have to give up.