<SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER>
Const adVarChar = 200
Const adInteger = 3
Sub Application_OnStart
		Application("CurrentID") = 0

        customRS.Fields.Append "ID", adInteger, 5       'No AutoNumber, sorry
        customRS.Fields.Append "IP", adVarChar, 15      '15 (xxx.yyy.zzz.aaa) long
        customRS.Fields.Append "LogOn", adVarChar, 5    'HH:MM tracking.. u could do more =D
        customRS.Open
        
        Session.Timeout = 1
End Sub

Sub Session_OnStart
		Application.Lock		'We need to lock the application
        If not customRS.EOF Then
                customRS.MoveLast
                AvailID = CInt(customRS("ID")) + 1
        Else
                AvailID = 1
        End If
		
		Application("CurrentID") = Application("CurrentID") + 1

        customRS.AddNew
        customRS("ID") = CLng(Application("CurrentID"))
        Session("ID") = CLng(customRS("ID").Value)
        customRS("IP") = Request.ServerVariables("REMOTE_ADDR")
        customRS("LogOn") = Hour(now) & ":" & Minute(Now)
        customRS.Update
        Application.Unlock
End Sub

Sub Session_OnEnd
        'If not customRS.EOF Then
                Application.Lock
                customRS.Find("ID = '" & Session("ID") & "'")
                customRS.Delete
                Application.UnLock
        'End If
End Sub
</SCRIPT>

<OBJECT RUNAT=Server SCOPE=Application ID=CustomRS PROGID="ADODB.Recordset">

</OBJECT>