Here is a complete online demo of it's usage! A documentation is included, too.
The demo resets every full hour.
You can download the class at phpclasses.org!
UP (to the list)
/*******************************************************************************\ * Copyright (C) 2004 Jarno Elonen (http://elonen.iki.fi/) * Copyright (C) 2005 Sarah King (http://sarahk.pcpropertymanager.com/) * Copyright (C) 2009 Horst Nogajski (http://hn273.users.phpclasses.org/browse/author/45770.html), (http://nogajski.de/) * * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - The name of the author may not be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * History: * Jarno Elonen created the original script and basic functions * Sarah King converted the functions to a class and built in user management routines * Horst Nogajski - built in group-support and extra infos (both optional) * - uses Apache-Style MD5-Cryption Passwords. Now works cross-platform (win,unix)! * - built in CSS-Styles for more useability * - built in Validation (min-max length, allowed Chars) for all entries * - LockingMechanism is more robust. Needed, because now every user may * send (lots) requests with writeaccess to the file(s), (password or info) * - and some more 'hardening' * * References: * http://httpd.apache.org/docs/1.3/howto/auth.html#basic * http://www.php.net/manual/en/features.http-auth.php \*******************************************************************************/ /*******************************************************************************\ * Credit and license for: md5crypt.php * ------------------------------------ * URL: http://tutorial.riehle-web.com/scripts/show.php?latest=md5crypt * Author: Dennis Riehle * Version: 1.0 stable * Last edit: Tue, 13 September 2005 13:49:28 GMT \******************************************************************************/
Screenshot of the minimal use: users and passwords
Screenshot of the maximal use: users/passwords, groups and extra infos