/////////////////////////////////////////////////////
//                                                 //
//           P H P P a g e P r o t e c t           //
//                 Version 1.0.0                   //
//                                                 //
//                 Copyright 2002                  //
//                  David Broker                   //
//          http://php.warpedweb.net/              //
//              All Rights Reserved                //
//                                                 //
//          In using this script you               //
//           agree to the following:               //
//                                                 //
//      This script may be used and modified       //
//              freely as long as this             //
//             copyright remains intact.           //
//                                                 //
//     You may not distibute this script, or       //
//           any modifications of it.              //
//                                                 //
//   A link must be provided on the website that   //
//             uses the script to:                 //
//          http://php.warpedweb.net/              //
//                                                 //
//      Any breaches of these conditions           //
//        will result in legal action.             //
//                                                 //
//      This script is distributed with            //
//        no warranty, free of charge.             //
//                                                 //
/////////////////////////////////////////////////////
Readme File for PHPPageProtect Version 1.0.0a

Contents:

About

PHPPageProtect is a user authentication system used to password protect selected pages.
Pages are protected by adding a single line of PHP script at the top of the page.
A web-based administration section allows for the creation of new users, deleting users, changing passwords and viewing logs.
User information and logs are stored in a flatfile (text) database.

Included Files

Here is a list of files that should be included in this distribution:
  1. readme.txt
    This file.
  2. admin.php
    The adminstration script.
  3. login.php
    The script which logs in/out the user.
  4. protect.php
    The script which provides the page protection.
  5. conf.php
    The configuration file.
  6. eg.php
    An example of a protected page.
  7. firstpage.php
    The first page you see when you log on.
  8. log.dat
    The file where login records are stored.
  9. users.dat
    Where username/encrytped passwords are stored.

Installation

  1. Requirements:
  2. Configure the scripts:
    1. First open admin.php, login.php and protect.php in a text editor.
      Edit the $config variable to point to the config file. If the conf.php file is in the same directory as admin.php, login.php and protect.php then you can leave these as they are.
      EG: $conf = "c:\\path\\to\\conf.php";
    2. Next open conf.php in a text editor.
      There are several variables to edit here:
      1. Set the administration username and password (case sensitive):
        EG: $admin_username = "Username";
            $admin_password = "PaSsWoRd
      2. The full server path to the users.dat file:
        EG:  $user_data = "c:\\path\\to\\users.dat";
             $user_data = "/path/to/users.dat";
      3. The URL of the first page the user will see when they login:
        EG: $first_page = "http://www.example.com/firstpage.php";
      4. The URL of the login page:
        EG: $login_page = "http://www.example.com/login.php";
      5. Whether or not you wish to log user logins (true/false):
        EG: $log_login = true;
      6. If you set $log_login to true, you must specify a log file path:
        EG: $log_file = "c:\\path\\to\\log.dat";
            $log_file = "/home/path/to/log.dat";
  3. Installing the scripts:
    1. Upload those files to your server.
    2. Change file permissions:
      On Unix the users.dat and log.dat files need to be writable by the webserver (usually "nobody").
      On Windows 9X/ME no permissions need to be changed.
      On Windows NT/2000 the users.dat and log.dat files need to be writeable by the webserver (usually "INET_USR" or similar)
  4. Using the scripts:
    Now we need to use the scripts.

ChangeLog

To Do