473,790 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ 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 2405
In article <3f************ ***********@new s.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.n l>...

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
2768
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 this would be simple enough if the ASP didn't have any user input, but it does.
2
4584
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 DATABASE event :
0
867
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 user automatically, need not user input password. how can I do it ? Is just call LogonUser function? Thanks Best Regards Leon
8
3454
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 likely something ive declared in my program that is preventing the logoff, i have tried closing and disposing forms and sql connections, is there anything else i should be looking for ? Or some way to step through it to find what is causing this ...
2
8424
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. I want to prevent the computer from logging off or shutting down until the app is closed. The best example I have is when you have an unsaved notepad.exe document open and logoff or shutdown, an End Program dialog pops up
2
1756
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, how do i determine the event of the closing application to process internal logoff procedure ??? appreciate all ideas :)
6
1608
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 computer continues to logoff. I currently have the application running as a logoff script. In other words I use the Group Policy window to add the executable as a logoff script. This works fine as long as the app is a console app. But if it's a...
3
2277
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 form before logoff. But I know that it run properly because when I log back in the form is there and works fine. So the form opened and run, but windows was already in the "logoff" screen with no desktop showing, so I missed the form. Is there any...
1
5325
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 to show a message box, so the user can answer Yes or No, and then let the logoff/ shutdown process continues.
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10413
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9986
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
9021
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
7530
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
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3707
muto222
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.