Apache::ASP Powered by ModPerl & Apache Powered by Apache::ASP
Demo ASP: global_asa_demo.asp 2017-11-22

This example serves as how one may use the global.asa file event handlers. Please see the global.asa file for the code relevant to this example.

The following table lists the sessions that have been recorded in the global.asa file into $Application. When a session ends, its time lived is recorded and displayed below. Active sessions are also listed.

39 Sessions Recorded
9 Active Sessions


008925... 345 seconds
$VAR1 = {};

009572... 324 seconds
$VAR1 = {};

00dda0... in session
$VAR1 = {
          'Started' => '1',
          'cleanup_count' => '1',
          'Ended' => '1',
          'onstart' => '1511315309',
          'Count' => '10'
        };

0104c1... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315022',
          'Count' => '10'
        };

014efc... 310 seconds
$VAR1 = {};

0178e3... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315054',
          'Count' => '10'
        };

01ca5e... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315141',
          'Count' => '10'
        };

023709... 319 seconds
$VAR1 = {};

04d57f... 319 seconds
$VAR1 = {};

052681... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315158',
          'Count' => '10'
        };

052c40... 348 seconds
$VAR1 = {};

059718... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315192',
          'Count' => '10'
        };

05d656... 314 seconds
$VAR1 = {};

05e18e... 1511315244 seconds
$VAR1 = {};

06a2ea... 321 seconds
$VAR1 = {};

06fff9... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315244',
          'Count' => '10'
        };

079a11... 332 seconds
$VAR1 = {};

08ebfd... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315105',
          'Count' => '10'
        };

09068c... 311 seconds
$VAR1 = {};

09258c... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315261',
          'Count' => '10'
        };

09486e... 361 seconds
$VAR1 = {};

09832a... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315210',
          'Count' => '10'
        };

09873f... 303 seconds
$VAR1 = {};

09955f... 316 seconds
$VAR1 = {};

09b293... in session
$VAR1 = {
          'Started' => '1',
          'onstart' => '1511315326',
          'Count' => '10'
        };

0a7efc... 1511315244 seconds
$VAR1 = {};

0a8a31... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315071',
          'Count' => '10'
        };

0aa060... in session
$VAR1 = {
          'onstart' => '1511315227',
          'Count' => '10'
        };

0b4d31... 328 seconds
$VAR1 = {};

0c0786... 341 seconds
$VAR1 = {};

0ce0f5... 334 seconds
$VAR1 = {};

0cfb0c... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315122',
          'Count' => '10'
        };

0e38d9... 324 seconds
$VAR1 = {};

0e5aeb... 306 seconds
$VAR1 = {};

0e5b9b... 1511315244 seconds
$VAR1 = {};

0e6002... 330 seconds
$VAR1 = {};

0e6d4d... 307 seconds
$VAR1 = {};

0ef56b... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1511315038',
          'Count' => '10'
        };

0f7fe4... 309 seconds
$VAR1 = {};

To see multiple sessions listed you may create a 2nd session by closing and then reopening the browser you are using to view this file, or you may also open a 2nd kind of browser to create this 2nd session. There is only one session-id generated per browser session for an asp application.


Here is a simple use of the Script_OnStart & Script_OnEnd event handlers, keeping track of the number of scripts executed this session:
Scripts Started This Session: 1
Scripts Ended This Session: 0

view this file's source