Techno Trade Logo
Password Protector

Description    This script is a very simple form of web site password protection. Instead of directing people to your main html file, you use this script as a filter to verify users for the password to gain access. If the password is accepted, then the script automatically takes the browser to the "protected" web page.

Looking for something more secure, and supports multiple users ?

Try our .htaccess password protector

How it works The only file needed to protect a page is the "password.cgi" script.
The values that need to be changed in the script are :
  1. $correctpass = "techno"; the correct password
  2. $correcturl = ""; URL to the protected page
  3. $scriptlocation = ""; Location of the Script on your server

To call the script, just have a link directly to it in your html file.
example :
<A HREF="">Connect to our protected pages</A>

Be sure you chmod the password.cgi script to 755 (executable) and upload it as ASCII.
Some disadvantages to the script is that after a user enters the correct password and gets transferred to the "protected" page, he/she can bookmark the page and come back to it later without going through the password filter. To avoid cases like this, you can change the name of the protected page regularly so people will have to go through your cgi and enter a password to access the site. Another method would be to ask your ISP about .htaccess, which provides a much better method to password protect directories on the web server.


(Password is : techno)

Price Free