Enough people have asked me how to create a simple password
protect system without a database. The system shown here is the
easiest system I've ever seen, and we've made it powerful and
versatile too. This system will work on any pages hosted on
Frogstar (or other ASP supporting system) without any technical
settings or permission requirements. Full support is available
free, even if you're not a Frogstar hosting customer.
Features:
Create your pages exactly as normal. No special
consideration is required during creation.
Once a username/password is entered, it can stay active for
any defined period of time, like 90 minutes or 90 days
Use with USERNAME only, or USERNAME/PASSWORD
Access to ANY protected page does a smart redirect to the
entry page, and then returns correctly to the accessed page.
Usernames are created as a standard hidden file. No
database or special permission settings are required
Compatible with all current browsers. ASP code is
executed invisibly by the server before the page is displayed.
You can RESET users and clear cookies
anytime.
There are three components:
The Authorization Check
The Login Page
The Password Records
This system is easy to install because it makes use of the ASP
"Include" function. Create every page on your web as normal. To
password protect any page, simply COPY the single line of
ASP code shown below, and PASTE it into the top of the normal HTML
code of each page you wish to protect. This is the only change
required to each protected page. The PASTED line of code
should be the VERY FIRST line of the page, even above <HTML> tag.
CHECK AUTHORIZATION
Create a new blank page in notepad, or whatever editor you
normally use to create web pages. This page should not contain
the traditional HTML code or <HEAD> information. It will
include only the following code. You can COPY and PASTE the
code shown here exactly.
Save this file in your web directory with the filename "password_inclusion.asp".
LOGIN PAGE: login_page.asp
Next you need to create the special LOGIN
page. You can create a page in your normal HTML or WYSIWYG web
page editor first, and then just COPY/PASTE the special code into
the HTML to make it work. This page must be saved with the
filename: login_page.asp
The code used in this example is actually
enough to make a fully functional web page, although it will be
limited to a simple form for username and password. You can
create the "pretty" parts as needed.
THE PASSWORD FILE: list.asp
Lastly the
passwords are all kept inside a single ASP file on the server.
These can be modified by hand. Simply duplicate as many lines as
you need, and enter in new users and passwords between the
quotations. Because of the way ASP files work, this is a fairly secure method of creating passwords. This file is not viewable online, even if they know the filename.
Note it is case sensitive and spaces work.
Bonus File: reset.asp
Create a single file called RESET.ASP and paste the following code into it. This code is just a simple bonus to RESET a user's cookies to default, so you can log-in as a different user or clear the cookies for testing. It is not required, and you choose whether you wish to make it a command accessible by the users or not.
NOTE: Comments are welcome
on this Password function. I am curious to know if this page
was helpful to you, and whether it is detailed enough to allow
self-installation. Please sign our guestbook, or give us some
feedback. I'd love to hear how you found this page too.