VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 Visitors Online?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mattan
Starting Member

1 Posts

Posted - April 15 2003 :  04:28:51  Show Profile  Reply with Quote
Hi

Making a visitors online (counter only) is relatively easy by manipulaing the global.asa file. But how would one go about creating a counter that allows you to also see the actual "UserNames" of the visitors online

Any assistance would be much appreciated

evie
Starting Member

5 Posts

Posted - May 13 2003 :  08:14:41  Show Profile  Reply with Quote
If you reply me...my email address is [email protected]

Hi Mattan, ^_^

I have been going through for the same thing than you... and I still getting no answer about it

Well... I was wondering if you people could tell me for which reason the code that I got below is not going through properly...
I have the four following files listed below...
However I cant see where is the problem...
I ve put all(files) in this path...
I bring the site (https://pgex.ipt.br/tj), then I log in and after that I add to it https://pgex.ipt.br/tj/session.asp as showed and as result when I click over session.log it comes in blank to me, instead of to bring the data that come from this line objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now () - in global.asa and so on


Note: Ive created in blank a file called session.log : | ? ! ? (The session.log cames in blank)

Thanks a lot

Joyce : )


---------------abandon.asp------------------
<%@ Language="VBScript" %>
<%
Session.Abandon
Response.Write("<html><head></head>")
Response.Write("<body onLoad=""self.close();""></body>")
Response.Write("</html>")
%>
---------------global.asa------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

' I do this because you can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "\\pgex\C\Inetpub\wwwroot\tj\session.log"

Sub Application_OnStart
Application("Start") = Now()
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Application_OnEnd
End Sub

</SCRIPT>
---------------session.asp------------------
<%@ Language="VBScript" EnableSessionState="True" %>
<html>
<head>
<title>Session Timeout Test</title>
</head>
<body onUnLoad="this.open('abandon.asp', 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=150,height=150');">

<p>
<strong>Current SessionId: <%= Session.SessionID %></strong>
</p>
<p>
This page just outputs your current session id for
reference. Check the <a href="session.log">session.log</a>
file for session OnStart and OnEnd timestamps.
</p>
<p>
I've set the Session.Timeout to 5 minutes so take note
of your session id and close your browser. Then check
the log file within the next couple minutes. You'll
see no session ended log entry. Wait for the 5 minutes
to pass and check again and it should be there.
</p>

</body>
</html>
---------------session.log------------------

--------------------------------------------------

Go to Top of Page

evie
Starting Member

5 Posts

Posted - May 13 2003 :  08:14:50  Show Profile  Reply with Quote
If you reply me...my email address is [email protected]

Hi Mattan, ^_^

I have been going through for the same thing than you... and I still getting no answer about it

Well... I was wondering if you people could tell me for which reason the code that I got below is not going through properly...
I have the four following files listed below...
However I cant see where is the problem...
I ve put all(files) in this path...
I bring the site (https://pgex.ipt.br/tj), then I log in and after that I add to it https://pgex.ipt.br/tj/session.asp as showed and as result when I click over session.log it comes in blank to me, instead of to bring the data that come from this line objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now () - in global.asa and so on


Note: Ive created in blank a file called session.log : | ? ! ? (The session.log cames in blank)

Thanks a lot

Joyce : )


---------------abandon.asp------------------
<%@ Language="VBScript" %>
<%
Session.Abandon
Response.Write("<html><head></head>")
Response.Write("<body onLoad=""self.close();""></body>")
Response.Write("</html>")
%>
---------------global.asa------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

' I do this because you can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "\\pgex\C\Inetpub\wwwroot\tj\session.log"

Sub Application_OnStart
Application("Start") = Now()
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Application_OnEnd
End Sub

</SCRIPT>
---------------session.asp------------------
<%@ Language="VBScript" EnableSessionState="True" %>
<html>
<head>
<title>Session Timeout Test</title>
</head>
<body onUnLoad="this.open('abandon.asp', 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=150,height=150');">

<p>
<strong>Current SessionId: <%= Session.SessionID %></strong>
</p>
<p>
This page just outputs your current session id for
reference. Check the <a href="session.log">session.log</a>
file for session OnStart and OnEnd timestamps.
</p>
<p>
I've set the Session.Timeout to 5 minutes so take note
of your session id and close your browser. Then check
the log file within the next couple minutes. You'll
see no session ended log entry. Wait for the 5 minutes
to pass and check again and it should be there.
</p>

</body>
</html>
---------------session.log------------------

--------------------------------------------------

Go to Top of Page

evie
Starting Member

5 Posts

Posted - May 13 2003 :  08:16:15  Show Profile  Reply with Quote
If you reply me...my email address is [email protected]

Hi Mattan, ^_^

I have been going through for the same thing than you... and I still getting no answer about it

Well... I was wondering if you people could tell me for which reason the code that I got below is not going through properly...
I have the four following files listed below...
However I cant see where is the problem...
I ve put all(files) in this path...
I bring the site (https://pgex.ipt.br/tj), then I log in and after that I add to it https://pgex.ipt.br/tj/session.asp as showed and as result when I click over session.log it comes in blank to me, instead of to bring the data that come from this line objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now () - in global.asa and so on


Note: Ive created in blank a file called session.log : | ? ! ? (The session.log cames in blank)

Thanks a lot

Joyce : )


---------------abandon.asp------------------
<%@ Language="VBScript" %>
<%
Session.Abandon
Response.Write("<html><head></head>")
Response.Write("<body onLoad=""self.close();""></body>")
Response.Write("</html>")
%>
---------------global.asa------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

' I do this because you can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "\\pgex\C\Inetpub\wwwroot\tj\session.log"

Sub Application_OnStart
Application("Start") = Now()
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Application_OnEnd
End Sub

</SCRIPT>
---------------session.asp------------------
<%@ Language="VBScript" EnableSessionState="True" %>
<html>
<head>
<title>Session Timeout Test</title>
</head>
<body onUnLoad="this.open('abandon.asp', 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=150,height=150');">

<p>
<strong>Current SessionId: <%= Session.SessionID %></strong>
</p>
<p>
This page just outputs your current session id for
reference. Check the <a href="session.log">session.log</a>
file for session OnStart and OnEnd timestamps.
</p>
<p>
I've set the Session.Timeout to 5 minutes so take note
of your session id and close your browser. Then check
the log file within the next couple minutes. You'll
see no session ended log entry. Wait for the 5 minutes
to pass and check again and it should be there.
</p>

</body>
</html>
---------------session.log------------------

--------------------------------------------------

Go to Top of Page

evie
Starting Member

5 Posts

Posted - May 13 2003 :  08:18:33  Show Profile  Reply with Quote
If you reply me...my email address is [email protected]

Hi Mattan, ^_^

I have been going through for the same thing than you... and I still getting no answer about it

Well... I was wondering if you people could tell me for which reason the code that I got below is not going through properly...
I have the four following files listed below...
However I cant see where is the problem...
I ve put all(files) in this path...
I bring the site (https://pgex.ipt.br/tj), then I log in and after that I add to it https://pgex.ipt.br/tj/session.asp as showed and as result when I click over session.log it comes in blank to me, instead of to bring the data that come from this line objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now () - in global.asa and so on


Note: Ive created in blank a file called session.log : | ? ! ? (The session.log cames in blank)

Thanks a lot

Joyce : )


---------------abandon.asp------------------
<%@ Language="VBScript" %>
<%
Session.Abandon
Response.Write("<html><head></head>")
Response.Write("<body onLoad=""self.close();""></body>")
Response.Write("</html>")
%>
---------------global.asa------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

' I do this because you can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "\\pgex\C\Inetpub\wwwroot\tj\session.log"

Sub Application_OnStart
Application("Start") = Now()
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Application_OnEnd
End Sub

</SCRIPT>
---------------session.asp------------------
<%@ Language="VBScript" EnableSessionState="True" %>
<html>
<head>
<title>Session Timeout Test</title>
</head>
<body onUnLoad="this.open('abandon.asp', 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=150,height=150');">

<p>
<strong>Current SessionId: <%= Session.SessionID %></strong>
</p>
<p>
This page just outputs your current session id for
reference. Check the <a href="session.log">session.log</a>
file for session OnStart and OnEnd timestamps.
</p>
<p>
I've set the Session.Timeout to 5 minutes so take note
of your session id and close your browser. Then check
the log file within the next couple minutes. You'll
see no session ended log entry. Wait for the 5 minutes
to pass and check again and it should be there.
</p>

</body>
</html>
---------------session.log------------------

--------------------------------------------------

Go to Top of Page

evie
Starting Member

5 Posts

Posted - May 13 2003 :  08:18:41  Show Profile  Reply with Quote
If you reply me...my email address is [email protected]

Hi Mattan, ^_^

I have been going through for the same thing than you... and I still getting no answer about it

Well... I was wondering if you people could tell me for which reason the code that I got below is not going through properly...
I have the four following files listed below...
However I cant see where is the problem...
I ve put all(files) in this path...
I bring the site (https://pgex.ipt.br/tj), then I log in and after that I add to it https://pgex.ipt.br/tj/session.asp as showed and as result when I click over session.log it comes in blank to me, instead of to bring the data that come from this line objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now () - in global.asa and so on


Note: Ive created in blank a file called session.log : | ? ! ? (The session.log cames in blank)

Thanks a lot

Joyce : )


---------------abandon.asp------------------
<%@ Language="VBScript" %>
<%
Session.Abandon
Response.Write("<html><head></head>")
Response.Write("<body onLoad=""self.close();""></body>")
Response.Write("</html>")
%>
---------------global.asa------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

' I do this because you can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "\\pgex\C\Inetpub\wwwroot\tj\session.log"

Sub Application_OnStart
Application("Start") = Now()
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()

Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub

Sub Application_OnEnd
End Sub

</SCRIPT>
---------------session.asp------------------
<%@ Language="VBScript" EnableSessionState="True" %>
<html>
<head>
<title>Session Timeout Test</title>
</head>
<body onUnLoad="this.open('abandon.asp', 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=150,height=150');">

<p>
<strong>Current SessionId: <%= Session.SessionID %></strong>
</p>
<p>
This page just outputs your current session id for
reference. Check the <a href="session.log">session.log</a>
file for session OnStart and OnEnd timestamps.
</p>
<p>
I've set the Session.Timeout to 5 minutes so take note
of your session id and close your browser. Then check
the log file within the next couple minutes. You'll
see no session ended log entry. Wait for the 5 minutes
to pass and check again and it should be there.
</p>

</body>
</html>
---------------session.log------------------

--------------------------------------------------

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000