* @copyright 2004 http://www.php-tools.net
* @license LGPL
**/
// load error handler
include_once './_error.php';
// include factory/loader
include_once '../patSession.php';
$options = array(
'expire' => 1
);
// most easy way to create a session object
$sess =& patSession::singleton( 'ham', 'Native', $options );
// recieve query string from session
$queryString = $sess->getQueryString();
echo 'This session will expire within one minute idle time.
';
echo 'Just wait one minute until you follow ';
echo ' this URL';
echo ' and watch the result...
';
// try to recieve a value from session
$result = $sess->get( 'expire-test' );
if( !patErrorManager::isError( $result ) )
{
echo '
The session reported no errors.
';
}
?>