473,756 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to find-out improper sign-out

Is there any way to run a function or a code-block whenever the client-
server communication breaks off. (ie power-off, browser-crash...)

Why I need this is, I want to update a login-table to trace user's
leave the portal without proper log-off or sign-out.

Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Kesavan.M
m.*******@hotma il.com

Mar 3 '07 #1
7 2120
Kesavan wrote:
Is there any way to run a function or a code-block whenever the client-
server communication breaks off. (ie power-off, browser-crash...)

Why I need this is, I want to update a login-table to trace user's
leave the portal without proper log-off or sign-out.

Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Kesavan.M
m.*******@hotma il.com
Sorry, HTTP is a stateless protocol. You can tell when a user accesses
your site, but not when he/she leaves.

Best is to use sessions and have a timeout on the session.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Mar 3 '07 #2
>Is there any way to run a function or a code-block whenever the client-
>server communication breaks off. (ie power-off, browser-crash...)
No. The best you can do is time out a session X time from the last
hit. Another kind of "improper sign-out" you won't see is clicking
on an ad and not coming back, clicking on the HOME button, typing
in a URL, etc. Know also that communication doesn't necessarily
stay up during a session. It may disconnect after completing each
page.
>Why I need this is, I want to update a login-table to trace user's
leave the portal without proper log-off or sign-out.
Find something else to need.
>Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?
Why on earth would you need such a thing, besides trying to drive off users?

Mar 3 '07 #3
Rik
Gordon Burditt <go***********@ burditt.orgwrot e:
>Is there any way to run a function or a code-block whenever the client-
server communication breaks off. (ie power-off, browser-crash...)

No. The best you can do is time out a session X time from the last
hit. Another kind of "improper sign-out" you won't see is clicking
on an ad and not coming back, clicking on the HOME button, typing
in a URL, etc. Know also that communication doesn't necessarily
stay up during a session. It may disconnect after completing each
page.
>Why I need this is, I want to update a login-table to trace user's
leave the portal without proper log-off or sign-out.

Find something else to need.
>Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Why on earth would you need such a thing, besides trying to drive off
users?
I'd even go so far as to say: the last one to log in clearly knows the
password, if another one is currently logged in under the same credentials
I log them out instantly. People can get seperate logins a plenty, no
reason to share, and another little security measure to, well, not
prevent, but end a specific session hijack.

--
Rik Wasmus
Mar 3 '07 #4
>>Is there any way to run a function or a code-block whenever the client-
>>server communication breaks off. (ie power-off, browser-crash...)

No. The best you can do is time out a session X time from the last
hit. Another kind of "improper sign-out" you won't see is clicking
on an ad and not coming back, clicking on the HOME button, typing
in a URL, etc. Know also that communication doesn't necessarily
stay up during a session. It may disconnect after completing each
page.
>>Why I need this is, I want to update a login-table to trace user's
leave the portal without proper log-off or sign-out.

Find something else to need.
>>Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Why on earth would you need such a thing, besides trying to drive off
users?

I'd even go so far as to say: the last one to log in clearly knows the
password, if another one is currently logged in under the same credentials
I log them out instantly.
I'll agree here: if you *must* insist on one login at a time, kill
the *old* session (which may have just suffered modem disconnectus),
not the *new* one. It also acts to discourage account sharing
(situation: pay site for pr0n or whatever). If you share your
account widely, *all* people trying to use it are likely to get
booted off often. It's harder to implement, though. One thing
that makes it a bit easier is to use a session save handler which
puts session data in a database, thereby making a search for people
logged in under the same account easier.
>People can get seperate logins a plenty, no
reason to share, and another little security measure to, well, not
prevent, but end a specific session hijack.
Depending on the design of the site, there are plenty of reasons
for the same user to try to pull up two different pages from the
site at the same time (for example, to look at two things you might
want and compare features side-by-side to decide which to buy), and
many times it is necessary made to log in twice to do that.

Mar 4 '07 #5
Rik
Gordon Burditt <go***********@ burditt.orgwrot e:
>>>Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Why on earth would you need such a thing, besides trying to drive off
users?

I'd even go so far as to say: the last one to log in clearly knows the
password, if another one is currently logged in under the same
credentials
I log them out instantly.

I'll agree here: if you *must* insist on one login at a time, kill
the *old* session (which may have just suffered modem disconnectus),
not the *new* one. It also acts to discourage account sharing
(situation: pay site for pr0n or whatever). If you share your
account widely, *all* people trying to use it are likely to get
booted off often. It's harder to implement, though. One thing
that makes it a bit easier is to use a session save handler which
puts session data in a database, thereby making a search for people
logged in under the same account easier.
I don't go as far as to use a custom save handler most of the time.
Determining wether a user is logged in is done with the help of a database
query though, where session id's and user id's are saved of the current
'active' users, which also gives a nice oppertunity to check the time of
last activity etc.
>People can get seperate logins a plenty, no
reason to share, and another little security measure to, well, not
prevent, but end a specific session hijack.

Depending on the design of the site, there are plenty of reasons
for the same user to try to pull up two different pages from the
site at the same time (for example, to look at two things you might
want and compare features side-by-side to decide which to buy), and
many times it is necessary made to log in twice to do that.
Normally, no. As long as he's using the same browser, he will have the
same session id, and it will still be considered one user serverside, even
if the requests hit the server at exactly the same moment (which 'never'
happens). If you use different browsers (firefox & MSIE for instance),
then they'll get different id's, simply because they don't use each
hothers cookies. On any normal site, opening a wide variety of pages with
a single login is perfectly possible.
--
Rik Wasmus
Mar 4 '07 #6
>>>>Every time a user at proper sign-in, a flag is set & account is locked
>>>>until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?

Why on earth would you need such a thing, besides trying to drive off
users?

I'd even go so far as to say: the last one to log in clearly knows the
password, if another one is currently logged in under the same
credentials
I log them out instantly.

I'll agree here: if you *must* insist on one login at a time, kill
the *old* session (which may have just suffered modem disconnectus),
not the *new* one. It also acts to discourage account sharing
(situation: pay site for pr0n or whatever). If you share your
account widely, *all* people trying to use it are likely to get
booted off often. It's harder to implement, though. One thing
that makes it a bit easier is to use a session save handler which
puts session data in a database, thereby making a search for people
logged in under the same account easier.

I don't go as far as to use a custom save handler most of the time.
Determining wether a user is logged in is done with the help of a database
query though, where session id's and user id's are saved of the current
'active' users, which also gives a nice oppertunity to check the time of
last activity etc.
Well, I wrote a save handler, and it's turned out to have lots of
uses. Part of the idea is that if you delete the session entry,
the user is logged out as of the next hit. You also get "last hit"
info. And it's useful for debugging. But there are other ways in
the "is he logged in" check to accomplish the same thing.
>>People can get seperate logins a plenty, no
reason to share, and another little security measure to, well, not
prevent, but end a specific session hijack.

Depending on the design of the site, there are plenty of reasons
for the same user to try to pull up two different pages from the
site at the same time (for example, to look at two things you might
want and compare features side-by-side to decide which to buy), and
many times it is necessary made to log in twice to do that.

Normally, no. As long as he's using the same browser, he will have the
same session id, and it will still be considered one user serverside, even
if the requests hit the server at exactly the same moment (which 'never'
happens).
I have been asked quite a few times about problems with this. It
seems some sites use session data for navigation, search parameters,
and options. If you have two browser instances with the same session
ID, they share this data. Browser A searches on "motorcycle ".
Browser B searches on "Barbie Dolls". Browser A refines search
with "helmet", and gets back an entry for a Barbie motorcycle outfit
including a helmet, and nothing about a real motorcycle helmet.
These users needed to *FORCE* having two different sessions in order
to do what they wanted to do. I don't remember which sites had this
issue. It wasn't Ebay. But I do recall it being real easy to bid on
or order the wrong thing if you had two browser windows open to
different items.

It seems to me that there was a certain patchlevel of IE6 that made
this worse. Perhaps according to the specs, IE6 was correct, but
it was causing a lot of questions at my ISP.

>If you use different browsers (firefox & MSIE for instance),
then they'll get different id's, simply because they don't use each
hothers cookies. On any normal site, opening a wide variety of pages with
a single login is perfectly possible.

Mar 4 '07 #7
On Mar 4, 5:35 am, gordonb.ku...@b urditt.org (Gordon Burditt) wrote:
>>>Every time a user at proper sign-in, a flag is set & account is locked
until he sign-out by updating in the login-table.At sign-out the flag
is released & his account is ready to log-in again.
Is my logic right?
>>Why on earth would you need such a thing, besides trying to drive off
users?
>I'd even go so far as to say: the last one to log in clearly knows the
password, if another one is currently logged in under the same
credentials
I log them out instantly.
I'll agree here: if you *must* insist on one login at a time, kill
the *old* session (which may have just suffered modem disconnectus),
not the *new* one. It also acts to discourage account sharing
(situation: pay site for pr0n or whatever). If you share your
account widely, *all* people trying to use it are likely to get
booted off often. It's harder to implement, though. One thing
that makes it a bit easier is to use a session save handler which
puts session data in a database, thereby making a search for people
logged in under the same account easier.
I don't go as far as to use a custom save handler most of the time.
Determining wether a user is logged in is done with the help of a database
query though, where session id's and user id's are saved of the current
'active' users, which also gives a nice oppertunity to check the time of
last activity etc.

Well, I wrote a save handler, and it's turned out to have lots of
uses. Part of the idea is that if you delete the session entry,
the user is logged out as of the next hit. You also get "last hit"
info. And it's useful for debugging. But there are other ways in
the "is he logged in" check to accomplish the same thing.
>People can get seperate logins a plenty, no
reason to share, and another little security measure to, well, not
prevent, but end a specific session hijack.
Depending on the design of the site, there are plenty of reasons
for the same user to try to pull up two different pages from the
site at the same time (for example, to look at two things you might
want and compare features side-by-side to decide which to buy), and
many times it is necessary made to log in twice to do that.
Normally, no. As long as he's using the same browser, he will have the
same session id, and it will still be considered one user serverside, even
if the requests hit the server at exactly the same moment (which 'never'
happens).

I have been asked quite a few times about problems with this. It
seems some sites use session data for navigation, search parameters,
and options. If you have two browser instances with the same session
ID, they share this data. Browser A searches on "motorcycle ".
Browser B searches on "Barbie Dolls". Browser A refines search
with "helmet", and gets back an entry for a Barbie motorcycle outfit
including a helmet, and nothing about a real motorcycle helmet.
These users needed to *FORCE* having two different sessions in order
to do what they wanted to do. I don't remember which sites had this
issue. It wasn't Ebay. But I do recall it being real easy to bid on
or order the wrong thing if you had two browser windows open to
different items.

It seems to me that there was a certain patchlevel of IE6 that made
this worse. Perhaps according to the specs, IE6 was correct, but
it was causing a lot of questions at my ISP.
If you use different browsers (firefox & MSIE for instance),
then they'll get different id's, simply because they don't use each
hothers cookies. On any normal site, opening a wide variety of pages with
a single login is perfectly possible.
Hi all,

it seems the original question has not been answered yet. If yes,
please ignore my mumbling.
Is there any way to run a function or a code-block whenever the client-
server communication breaks off. (ie power-off, browser-crash...)
1) If you write your own session handler you can use the function for
the garbage collection to do this.

2) If you store somewhere (a login log?) if when a user has logged in
and when the user has logged out, you can derive your needed
information from there.

good luck
Martin

------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at


Mar 4 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2125
by: Nathan Rose | last post by:
Here's my problem. I am reading from a text file using this: if (!file_exists($file)) { echo "Don't exist\n"; return false; } $fd = @fopen($file, 'r'); if (!is_resource($fd))
6
4964
by: seansan | last post by:
Hi, Does anyone know how to read the full access version number in visual basic? I need to know if the current program instance is SR-1 or SP-3, etc... I currently use: DB_DAO = DBEngine.Version DB_JET = CurrentDb().Version DB_VERSION = Application.SysCmd(acSysCmdAccessVer)
6
4350
by: ti33m | last post by:
Hi All, I'd like to include a datasheet on my user interface but since I'm starting to run tight on space, I'd like to have a vertically-oriented datasheet (column 1 has labels, column 2 has values), i.e. a transposed datasheet or datasheet in column format. A vertical datasheet will look cleaner, eliminate the need to scroll across (for miles) and lay out bit more efficiently since I have some long labels. It seems like Access only...
3
4321
by: sandrina | last post by:
Hello everyone, My name is Debi and I am an Administrative assistant with a large company in their sourcing department. I was hired one month ago, and walked in to a HUGE filing nightmare. My boss requires a paper copy of everything to be saved and filed. The vendors we purchase from produce hundreds of different products, with enough paper to sometimes fill half a filing cabinet on their own. Anyway, after discussing everything and...
8
3260
by: Jack Addington | last post by:
I want to scroll through the alphabet in order to scroll some data to the closest name that starts with a letter. If the user hits the H button then it should scroll to the letter closest to H. If no one exists with H, then go to I, etc. If its near the end, say 'V', and the last person is a 'T' then it should work its way back up the alphabet. I was trying to loop as if the Char's were ints but I am having problems I have buttons...
2
4174
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! I'm currently writting a program in which there is a file/folder list which mimics part of Explorer's list. I've got it pretty much cornered, but I still have a couple of problems :
1
3950
by: | last post by:
Hi Database Gurus, Not to start a war among fanatics, but I just wanted to get honest opinion/advise of smart folks like you about this. We are about to begin development for a data intensive web based application and are faced with the choice of database software. We (at least currently) are focusing on free software. Some basic research has indicated both Postgresql and Mysql as the best of lot. Can people please advise as to pros/cons...
4
2759
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last time i ask for an entire code or u can give me the outine of what to do and i ll do it by myself. the description is the following: the program will read a text file that contains historical price of a stock. The program will allow users to query...
0
1299
by: [Cool staff!||Hi! I think this need for || Help me | last post by:
http://con-cern.org/files/2007/5/xenical-21024312.html cheap xenical http://con-cern.org/files/2007/5/auto-21024411.html auto loan refinance http://tag-dev.jot.com/WikiHome/pharmacy/xenical_html___117970823717048_96302128227356?jot.viewName=xenical.html&theme=none buy xenical http://tag-dev.jot.com/WikiHome/pharmacy/auto_html___117970831070975_10304845439619?jot.viewName=auto.html&theme=none auto loan refinance ,...
2
1166
by: Dotan Cohen | last post by:
I need an application, and I'd like it to be written in Python with QT as I am a KDE user. I simply don't have the time to code it myself, as I've been trying to find the time for half a year now. What are some reputable websites for finding Python coders? If anyone on the list wants the job, this is what I need: I need a hierarchical list manager, similar to ListPro (http://www.iliumsoft.com/site/lp/listpro.htm) which is the app that...
0
9869
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9708
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.