XMG Network: Xavier Mail | XavierPedia | Xavier Seek | Xavier Forum | Xavier Finance
Xavier Media Publishing
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.103.63.18
 
  Look up IP address
  Traceroute
  DNS Lookup
 

PHP Scripts:
PHP Scripts
Search Engine
Hoplink Script
Cookie Protection
File Protection
Keno Game
META tag generator
Password Script
Time & Date
Toplist Free
Toplist Pro

CGI Scripts:
CGI Scripts
Counter
Download Script
Password Protection
Redirection
Submission Script

Xavier Media™:
JavaScripts
Documents & Articles
Antivirus
Free eBooks
Aquarium
Ask Amanda
MP3 downloads
Adbazar Forum
HTML Codes & color converter
Public Information

Webmaster tools:
Whois Tools
Meta tag generator
Currency converter
Webmaster Tools
Forum Hosting

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-2008 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