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.

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.