session end

General discussions related to php

Moderators: macek, egami, gesf

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

session end

Postby liquedus » Thu May 15, 2003 11:31 am

i was wondering if there was a way to catch/know end of a session by user on the server side.

the equiv in javascript, disregarding that js is client side, is onunload()

and i think the eqiv in asp is Session_OnEnd() in the global file.

mind you what i am looking for is a user closing his/hers browser or that category of 'abnormal' termination (reset,turn off...)

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Tue May 20, 2003 12:45 am

I don't believe there is.. if there is I haven't found it.. one thing you can do is enter the sessions in a database along with a timestamp when they were last accessed. you can then have the script check every 60 secs or so to see if the session has been accessed in the past minute. if not you delete it from the db.

as far as abnormal termination.. what do you consider abnormal termination. because it is server side there is really no way to know this.


Return to “PHP General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron