Password Protect Any PHP Page With MMO
Password protect any PHP web page. Anywhere on your domain.
The latest version of Master Members Only (version 3.5)
lets you do exactly that.
Password protect as many individual web pages as you want.
The pages to protect need to be PHP pages. At the top of
each page is a bit of PHP code for the protecting (see step
3 of the overview, below).
Pages you password protect in this way can be viewed only
by those who previously logged into the membership area.
All others are kicked off.
The "How To Password Protect Individual Web Pages" section
of the manual
contains step-by-step instructions.
Here is an overview of those steps:
-
Turn cookies on in the Master Members Only control
panel.
-
Create a PHP file with content copied from the
instructions. Modify 2 URLs, the URL to a script in
your Master Members Only installation and the URL
where to send the browser if the visitor is kicked
off your page.
-
At the top of every PHP page to be password
protected, paste 3 lines of PHP code. (The code
imports the PHP file you created in step 2.)
That's it.
From then on, any pages you want to password protect, just
do step 3 with them. (Steps 1 and 2 are done only once.)
If you're already using Master Members Only, generate the
latest version and replace the old with the new. There is
one more program file with the latest version, okay.cgi.
Give it 755 permissions.
Now, if you've modified your previous version of
Master Members Only (applies to versions 3.#), and
you really don't want to redo all that work, here is
good news. The "Master Members Only Upgrade" blog post
shows you how to update your current version without
replacing your customizations -- by inserting copy 'n
paste code into two files and installing okay.cgi
Individual password protected web pages wherever you want
them is now possible with Master Members Only.
And the upgrade is free.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©Copyright 2007 Bontrager Connection, LLC Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.