p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asptoday_discuss thread: Sesion variables


Message #1 by "Patrick Ames" <patrick00@n...> on Mon, 7 Jan 2002 18:51:12
Does anyone know of a script i can run on an NT server that will check 

what predtermined sessions are running on a site, write them to a file as 

they are created and deleted as a person leaves. Failing that is there a 

command available so that if someone leaves the site by closing the 

browser and not logging out, another window opens with a page telling them 

they did not log out properly. While they read this page a script on the 

page can run and abandon the session for them.



Message #2 by "Mark Phillips" <webmaster@d...> on Mon, 7 Jan 2002 18:57:59 -0000
You must be doing something very similar to me, I'd like the answers to both

these questions ;-)



I'm managing "members online" using functions and stored procs in an SQL

Server DB to update "time of last activity" on each page load, and regarding

a session as "alive" (member online) if they hit a page in the last 20

minutes.







-----Original Message-----

From: Patrick Ames [mailto:patrick00@n...]

Sent: 07 January 2002 18:51

To: ASPToday Discuss

Subject: [asptoday_discuss] Sesion variables





Does anyone know of a script i can run on an NT server that will check

what predtermined sessions are running on a site, write them to a file as

they are created and deleted as a person leaves. Failing that is there a

command available so that if someone leaves the site by closing the

browser and not logging out, another window opens with a page telling them

they did not log out properly. While they read this page a script on the

page can run and abandon the session for them.







Message #3 by "Patrick" <patrick00@n...> on Mon, 7 Jan 2002 19:19:51 -0000
Sounds like we are lol

What is the url of your site

Mine is http://members.palmcomputinguk.com

if you wish to have a look



Patrick





----- Original Message -----

From: "Mark Phillips" <webmaster@d...>

To: "ASPToday Discuss" <asptoday_discuss@p...>

Sent: Monday, January 07, 2002 6:57 PM

Subject: [asptoday_discuss] RE: Sesion variables





> You must be doing something very similar to me, I'd like the answers to

both

> these questions ;-)

>

> I'm managing "members online" using functions and stored procs in an SQL

> Server DB to update "time of last activity" on each page load, and

regarding

> a session as "alive" (member online) if they hit a page in the last 20

> minutes.

>

>

>

> -----Original Message-----

> From: Patrick Ames [mailto:patrick00@n...]

> Sent: 07 January 2002 18:51

> To: ASPToday Discuss

> Subject: [asptoday_discuss] Sesion variables

>

>

> Does anyone know of a script i can run on an NT server that will check

> what predtermined sessions are running on a site, write them to a file as

> they are created and deleted as a person leaves. Failing that is there a

> command available so that if someone leaves the site by closing the

> browser and not logging out, another window opens with a page telling them

> they did not log out properly. While they read this page a script on the

> page can run and abandon the session for them.

>

>

>

>



Message #4 by "Kamruz Jaman" <kamruz@b...> on Sun, 13 Jan 2002 03:58:47
Afraid i'm not going to be able to provide the full answer here but i did 

think about using the same kind of thing but didn't persue it much but 

sounds like you're interested in using the Session_OnStart() and 

Session_OnEnd() in the global.asa file. When a user connects and 

disconnects these are called respectively and the code within these 

functions carried out. If you do a searcj on any asp site on these you 

should be given loads of info.



I suppose you could call store procedures within each of these to carry 

out what you need, and use the SessionID as the unique id for the record 

(assuming you want to dump the info into a database) or use the 

FileSystemObject (to a text file). These can then be called from another 

asp page to list all records. i don't think you can use the Seesion_OnEnd

() routine to call another page on the client though, since it is Server-

side but it could be used to log the user out.



Hope this explanation is kind of clear and helps!



Kamruz

  Return to Index