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?


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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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