Follow @XavierMedia at Twitter.com
Xavier Media
Latest news from Xavier Media
Xavier Tools:
Domain Names | Web Search | Currency Converter | IP Tools | More Tools...
  Domain Name:
 
  Whois Search
  DNS Lookup
  Domains for Sale
 
  Search the Web:
 
  All Xavier sites
  XavierForum.com
  The Web
 
  Currency converter
  Convert
 
  into
 
 
  IP Tools:
  Your IP 38.107.191.81
 
  Look up IP address
  Traceroute
  DNS Lookup
 

CGI Scripts

PHP Scripts

XavierMedia.com

Webmaster Tools

Type of script: PHP
Version: v1.1
Cost: Free
Download: Yes
Support: Yes
Demo: Yes

Note:
Since many of our users have had problems installing and using this script we have created a new password protection script. The new script can be found here.
We will however still offer support for this script at our online support forum, if you deside to use it.

What's this
This small script will help you password protect PHP pages. If you want to protect a directory or non-PHP files you should have a look at this example.

Online Demo
We have a demo available at http://www.xaviermedia.com/php/password_demo.php. Try user1 as login name and password1 as password.

Download the script
Click here to download the script or visit our Password Installer to create the file you need to protect your homepage.

How to add more users
Just add "the new login name" => "new password", somewhere between ( ) in the $user_passwords:
$user_passwords = array (
      "user1" => "password1",
      "user2" => "password2",
      "user3" => "password3",
      "the new login name" => "new password",
      "user4" => "password4"
      );

Need someone to host your new script?
If your hosting company doesn't support PHP you'll find a new one that does at eXavier.com.



© Copyright 1996-2010 Xavier Media®. All rights reservered.
Contact us | Support/help | Privacy Policy | Company Info | SiteMap
The World According to Xavier | Xavier in the World | the Xavier Media blog