I would like to know how to check if a PHP session is alive thanks to a specific id. This or something that could give me access to the active session list.
I found some related information on the Internet, but could not get the correct answer.
To talk a little about this, I am writing a website that allows users to modify content (say, articles, for example). And since I do not want them to change the same resource at the same time, I had to think about a protection system.
Thus, the idea was that every open resource would be locked and associated with a session identifier. When done, the user will release it. But, of course, nothing prevents him from simply closing the window, allowing the content to block it in writing.
Therefore, I should be able to check if the session is alive, and if the lock is still legal.
source
share