Professional Web Applications Themes

end of session detection - PHP Development

Hi, how to detect if a user closes the browser and so ends the php session? (i have a login system and i need to know if somebody doesn't logout of it, just closes the browser). For example: i have user1 with a username and password, i just want to disable somebody to double login with the same username and password (at the same time of course). What is the best way to do it? tnx, Greg...

  1. #1

    Default end of session detection

    Hi,

    how to detect if a user closes the browser and so ends the php session?
    (i have a login system and i need to know if somebody doesn't logout of
    it, just closes the browser).

    For example: i have user1 with a username and password, i just want to
    disable somebody to double login with the same username and password (at
    the same time of course).

    What is the best way to do it?

    tnx,
    Greg
    Gregor Guest

  2. #2

    Default Re: end of session detection

    In article <newsguy.com>,
    Gregor Rot <dontwritemeemail> wrote:
     

    Since closing the browser is totally a function of the client and php
    runs on the server, there's really no way to do this with php alone. If
    you associate a timestamp with a session ID, you can expire sessions
    based on a reasonable length of time. I don't see any other way to do
    this.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Michael Guest

  3. #3

    Default Re: end of session detection

    Michael Vilain wrote: 
    >
    >
    > Since closing the browser is totally a function of the client and php
    > runs on the server, there's really no way to do this with php alone. If
    > you associate a timestamp with a session ID, you can expire sessions
    > based on a reasonable length of time. I don't see any other way to do
    > this.
    >[/ref]
    Thank you - but is there any way to detect session activity : basically
    then, i want a user to be logged out of the system (that involves a
    change in a mysql database) if idle for more then some time...

    tnx,
    Greg
    Gregor Guest

  4. Moderated Post

    Default Re: end of session detection

    Removed by Administrator
    Manchild Guest
    Moderated Post

Similar Threads

  1. Replies: 17
    Last Post: September 12th, 11:42 PM
  2. IP detection
    By germaris in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 20th, 02:51 PM
  3. Replies: 3
    Last Post: January 12th, 05:18 PM
  4. Replies: 2
    Last Post: September 23rd, 07:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139