iLogin - Installation

  1. Download the latest release from the download page.
  2. Unzip the zip file to a temporary directory on your PC.
  3. Edit the "ilogin/ilogin_config.inc.php" file as appropriate for your site.
  4. Upload the files using FTP to a directory called "ilogin". Ideally this should be in the web site root directory (i.e. http://www.yoursite.com/ilogin).
  5. You need to ensure that the PHP script can write to the .htpasswd file that you just uploaded. If your web site host machine is running Windows, you probably do not need to do anything. If it is Unix then you need to "chmod" the .htpasswd file to allow read and write for all (chmod 666 .htpasswd).
    If you use WS_FTP, left click on the .htpasswd file in the right hand window, right click, select "chmod (unix)" from the menu, tick all of the "read" and "write" boxes, and click "OK".
  6. Use the instructions below to create a .htaccess file to password protect some files or directories on your web server. You can have multiple .htaccess files (in different directories), allowing you to apply password protection to as many directories and files as you want.

Protecting Directories

If you want to only allow registered users to view the files within a particular directory, use this method. To protect all files in a directory:

  1. Check whether there is a file called .htaccess in the directory.
  2. If there is already a .htaccess file, append the following to it, else create a new file called .htaccess containing the following:

AuthUserFile /full/path/to/ilogin/.htpasswd
AuthGroupFile /dev/null
AuthName "iLogin"
AuthType Basic

require valid-user

<Files .htaccess>
    order allow,deny
    deny from all
</Files>

  1. Replace "/full/path/to/ilogin" with the full path to the iLogin directory from the root of your web server hard disc. This might be something like "/home/yoursite.com/public_html/ilogin". You need to ask you web hosting provider for this path.
  2. Upload this file to your web site using FTP.

Protecting Files

You can protect specific files on your web server, restricting access to registered users only. To this:

  1. Check whether there is a file called .htaccess in the directory.
  2. If there is already a .htaccess file, append the following to it, else create a new file called .htaccess containing the following:

<Files .htaccess>
    order allow,deny
    deny from all
</Files>

<Files filename.htm>
  AuthUserFile /full/path/to/ilogin/.htpasswd
  AuthGroupFile /dev/null
  AuthName "iLogin"
  AuthType Basic

  require valid-user
</Files>

  1. Replace "/full/path/to/ilogin" with the full path to the iLogin directory from the root of your web server hard disc. This might be something like "/home/yoursite.com/public_html/ilogin". You need to ask you web hosting provider for this path.
  2. Modify filename.htm to be the file that you want to protect. You can use * to match patterns, e.g. private*.htm will protect private1.htm, private2.htm, private99.htm etc.
  3. Upload this file to your web site using FTP.

This site is hosted by Z-Host. For low cost PHP web hosting visit Z-Host.com. Web hosting plans start at just $20 PER YEAR.


For more scripts than you can shake a stick at, visit

Introduction

Demonstration

Requirements

Installation

FAQ

Support

Download

Commercial Licence

Donate
 
 
Rate iLogin at HotScripts.com
Excellent!
Very Good
Good
Fair
Poor