Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a members only site running WordPress and a stock images gallery running an old php gallery CMS. I want the members to only have to login once but I want to protect the gallery from the general public. I trust my members so I don't need anything spectacularly secure. I was thinking about using an iframe that auto logs into the gallery folder via HTTP authentication. Is this possible (if so how) or is there a better method?

share|improve this question

Your iframe method could work. You could extract the usernames and hashed passwords from the wordpress database and use them to create usernames and passwords on your gallery. The method for this would depend on what sort of server you have.

You would then need to hack Wordpress to create an iframe with the source link having the username and hashed password embedded in it like this:


Another method would be to tweak the php gallery so that it only works for certain unguessable URLs, and generate one of those for each user such as a hash of their username.


This would mean less tweaking of Wordpress (no diving into the database) but more tweaking of your gallery CMS>

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.