title: Get a list of connected users with PHP
body: <p>In order satisfy a client, I have to create a simple dashboard in PHP, where the customer admin can see a list of connected users.</p>
  
  <p>So, I would like, when a client login on the web site, create a socket. Why ? because if the customer close his browser without logout, so, the socket will be automatically closed. If I use only sessions with a table of connected users and a boolean, if the user closes his browser instead of logout, the table will not be updated ... So for me, it's not a good method.</p>
  
  <p>Does exists a way in order to get the list of opened sockets ? and if yes, it is possible to get the id user associated with the opened socket ?
  Or perhaps, there is an other way to proceed ...</p>
  
  <p>PS : I have seen Node.js, that can be very helpful but I can't use this techno. I haven't the permission.</p>
  
  <p>Thx all, I am waiting for any advices or links reference documentation :)</p>