Jump to content

How to link an image in a protected folder


abdfahim

Recommended Posts

I have a folder containing images and I protected it so that no one can directly access/download those images. So, Now if anyone directly type "www.myaddress/protected/image1.jpg", the browser asks for username and password (which I have set). But i want to link those images in another php page "www.myaddress/link.php". But the problem is this page also asked for password. Is there any way to enter username and password through php coding in that page "link.php" ? Btw, I protect the folder through a built in feature in www.pro-hosts.org and I think they use .htaccess format.

I think I am not clear in my question. I have folder where I put some files and put the links to those files in my website in a link page. Now my website requires signing and any one sign in, can download those files. But to make it sure that without signing in, no one can download those files by direct linking, I made the folder protected so that in case of any direct linking, browser asked for a username and password. But the problem is now when I tried to load the link page, whether i am signed in or not, it asked for password. Thats why I am looking for a php code with which I can put the password inside the link page so that no password is prompted when loading that page..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.