Hi all,
I have a website that has it's own inbuilt PHP membership system for accessing pages and that works fine. However, I want to be able to add some multimedia files that can only be downloaded by certain membership groups, even if someone uses a direct URL to the file and they do not have permission.
I don't want to use standard HTTP authentication, but instead have my normal PHP security scripts make the decision as to whether that user can download the file.
Is there a way of doing this that anyone is aware of?
I use Apache, is there anyway of putting an 'intercept' in place to call a script before it allows a download? The only other way I thought of doing it is to call a php download script with a parameter for a file on the server and that script returns the binary data of the selected file from the server. The actual filename of the file being downloaded is never disclosed.
Any help much appreciated!