vendredi 16 juillet 2021

How to hide certain image URLs with PHP

I am trying to make the ability to hide certain images from certain people. Currently, users can upload photos to the website and choose whether or not to add a watermark. When they add the watermark, the website will save the watermarked photo as TEB-[filename].jpg and save a copy of the original as [filename].jpg. I am wondering if there is a way through PHP or .htaccess to hide those files that have TEB- counterparts from users who do not have a certain $_SESSION value?

Just to clarify, ONLY if the user created a TEB- version of the file should the original be blocked from people without the correct $_SESSION['special'] parameter.

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire