I explained it badly so here is a piece from the manual(ASP):
5.2.2 Global.asa File
Global.asa is an optional file that stores script procedures and objects used globally by an application. Script procedures declared in Global.asa can only be for Application_OnStart Event, Application_OnEnd Event, Session_OnStart Event, and Session_OnEnd Event events. Scripts that do not have session or application scope cause the server to return an error. Global.asa files that do not use Application Events or Session Events are ignored. Script procedures declared in Global.asa cannot be called from ASP pages in an application.
The file must be called Global.asa and stored in the root directory of the application. There can only be one Global.asa file per application.
5.2.4.1 Session_OnStart Event
The Session_OnStart event occurs when the server creates a new session. The server processes this script prior to executing the requested page. The Session_OnStart event is where you set any session-wide variables, they will be set before any pages are accessed. All the built-in are available and can be referenced in the Session_OnStart event script.
Syntax
<SCRIPT LANGUAGE=ScriptLanguage RUNAT=Server>
Sub Session_OnStart
. . .
End Sub
</SCRIPT>
Parameters
ScriptLanguage
Specifies the scripting language used to write the event script. It may be any supported scripting language, such as VBScript or JScript. If more than one event uses the same scripting language, they can be combined under a single set of <SCRIPT> tags.
Runat
Must be "Server".
5.2.4.2 Session_OnEnd Event
The Session_OnEnd event occurs when a session is abandoned or times out. Only the Application, Server and Session built-in objects are available.
Syntax
<SCRIPT LANGUAGE=ScriptLanguage RUNAT=Server>
Sub Session_OnEnd
. . .
End Sub
</SCRIPT>
Parameters
ScriptLanguage
Specifies the scripting language used to write the event script. It may be any supported scripting language, such as VBScript or JScript. If more than one event uses the same scripting language, they can be combined under a single set of <SCRIPT> tags.
Runat
Must be "Server".
I'm looking for the equilvilent of
5.2.4.1 Session_OnStart Event AND
5.2.4.2 Session_OnEnd Event is PHP.
Hope this helps.
Regards,
Johan Hanekom