class_session.php is a session management and password protection class. It can be used to perform 2 major functions:
1. Create and maintain session state between page hits. The class does this using simple session cache files into which the session is stored as a serialized array. This is similar to how PHP's built-in sessions store session data. One big advantage of this class is that you have full control over the session timeout.
2. Password protect PHP pages by requiring authentication. Simply pass in "true" when creating a new session object to use this functionality. You'll also need to create your own login.php script. A sample login.php is packaged with this class.
Most current information and documentation and downloads found at
There are two complete PHP files listed below. First is the class file, class_session.php. The second is example.php to show you how to use the class.