Jump to content

Check if user is online


prophy

Recommended Posts

Could it be made a script that check if a user connection is breaked (for example internet connection is stopped or user is closed the browser). And not only to be displayed error message to the user but this event to be registered by my PHP script.

For now the only idia that i have is a JavaScript event onClose() of the browser but this is not the solution that I want.

I was thinking if there is a method for PHP to listening for an event of breaked connection with the user browser or something similar.

Thanks in advance.

Link to comment
Share on other sites

Well sessions last for the length of the browser being open. (IE, session.) However, PHP is server side, not client side. It can't tell when the client closes the browser. Javascript IS the way to go there.

 

PS: The word you want is broken, not breaked.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.