Publicly Visible Uploads vs Members Only Visible Uploads

Hello, I am writing a php script that will contain a publicly visible section as well as a “members-only” section. I would like to incorporate a feature for members to upload files and mark them as either publicly visible or require that users log in in before being able to view them. I am wondering what the best way would be to do this.

I’ve researched some methods such as utilizing .htaccess, uploading files outside public_html, etc. but am not sure which method is the most secure. I would appreciate any recommendations on how to do this.

Thanks!

You will have to do .htaccess if you want no one but members to be able to access the pictures at all, but you can also control who does or doesn’t see using PHP though they would still be able to access the folder if the is no .htaccess.

Most secure method is keeping uploaded files outside public_html. You can access them via php script that verifies user privileges.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.