473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

logoff user with php *urgent*

Hello,

If somebody could help me with this one it would be very nice,

the story:
I need to check if a user is online or not at the moment i am doing a user
logoff with javascript but this is not browser proof so it doesn't work all
the time. or doing it with a for() statement that writes every 20 sec the
last unix time to a database, this doesn't work because the for() statements
stops executing the rest of the page so that doesn't work either

the problem:
i can only have one user online for a group, so i have to check if the first
that logges in for a group is online or not, i have a check time of 1 minut
so if a user logges off, a new user can login after a minut.

the reason:
so you think what is the problem put a logoff button on the screen and your
finished, well that would be the answer if i wasn't developing a page for
idiots that destroy the browser window by alt-f4 or the cross instead of the
logoff button.

so hope somebody hacked this problem before.

Thanks in advance

(sorry for the multi post)

G
Jul 17 '05 #1
2 2381
In article <3f***********************@news.xs4all.nl>, Spam sucks wrote:
Hello,

If somebody could help me with this one it would be very nice,

the story:
I need to check if a user is online or not at the moment i am doing a user
logoff with javascript but this is not browser proof so it doesn't work all
the time. or doing it with a for() statement that writes every 20 sec the
last unix time to a database, this doesn't work because the for() statements
stops executing the rest of the page so that doesn't work either

the problem:
i can only have one user online for a group, so i have to check if the first
that logges in for a group is online or not, i have a check time of 1 minut
so if a user logges off, a new user can login after a minut.

You can have function check_timeouts() and store_time() that are called
everytime a page is requested.

The store_time function only has to store the current_time.
The check_timeouts function has to compare current_time with stored_time.
If the difference for a user > 60, log the user out.

--
Visit my website at http://aardbei.madoka.be
Jul 17 '05 #2
"Spam sucks" <nomail> wrote in message
news:<3f***********************@news.xs4all.nl>...

I need to check if a user is online or not at the moment
You can't. All you can do is to figure out who accessed your
site within the last X minutes, hours, or days.
so hope somebody hacked this problem before.


Of course. You must assume that the user is offline, unless you
have reasons to believe otherwise (e.g., a recent access to a page
on your site with that user's credentials).

Cheers,
NC
Jul 17 '05 #3

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

Similar topics

8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
2
by: Michael | last post by:
Hi, I was creating a trigger to fire when a user ends a session, but I see that you could have it fire on a SCHEMA event : CREATE TRIGGER "SRU"."TEST" BEFORE LOGOFF ON "SRU".SCHEMA or a...
0
by: Leon Huang | last post by:
Hello: When I call ExitWindowsEx funtion to logoff the current user, I want to know when the logoff ends, can you tell me? by the way, after logoff the current user, I want to logon with another...
8
by: Jm | last post by:
Hi All I have an app that when running if a user selects logoff or shutdown from the start menu, it will close itself but not logoff windows or shutdown. From what i have found so far its most...
2
by: mikemiller.innova | last post by:
I developed a C# Windows App that requires a user to input their real name and what they did to the server while they were online. I am going to launch the app att shutdown via a logoff script. ...
2
by: spncc | last post by:
i'm using VS 2005 to make the window form authen application. there is a logon status to make use of logoff procedure when the user click on it. however if the user didn't click at logoff control,...
6
by: =?Utf-8?B?Zmh1bnRlcg==?= | last post by:
Hi I have a small .net Windows app that I need to run before the user logs off the machine. This is a Windows App where a dialog is displayed to the user and he/she needs to answer before the...
3
by: =?Utf-8?B?Zmh1bnRlcg==?= | last post by:
I have a Windows Service that should pop a windows form right before logoff, for the user to enter some information. I got things working fairly well except that the user does not get to see the...
1
by: Clemente | last post by:
Hi, We have a VB.Net application that is sleeping until it receives a logoff/shutdown event. We want the application running on Vista and XP. When the application receives those events it has...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.