File: examples/extended-include.php

Recommend this page to a friend!
  Classes of Tony  >  twzAuth  >  examples/extended-include.php  >  Download  
File: examples/extended-include.php
Role: Example script
Content type: text/plain
Description: example script
Class: twzAuth
Authenticate users using HTTP Basic authentication
Author: By
Last change:
Date: 5 years ago
Size: 427 bytes
 

Contents

Class file image Download
<?php
/*
    twzAuth-include.php (extended mode)

    If you only have one page to protect, these commands can be in that script.
    We've used this include file to make it easier to protect multiple pages.

*/

require '../twzAuth.class.php';

$auth=new twzAuth('./users.db'); // TIP: datastore is safer above the web root

$auth->setAdmin('admin_user', 'sWWe#6&*uyggh!');

$Username = $auth->validate();

?>


For more information send a message to info at phpclasses dot org.