When a user starts my app, I ask for the PHP session id string using session_id()
. I store this session ID string in a MySQL table.
The app can have dozens of people logged in at a time, and I need to be able to terminate a user through a program that is used by the admin and that lists all the active users. So far I have not been able to find a function like terminate_session($session_id)
, but I need to be able to terminate another PHP user's session. Is there an easy way of doing this?
Added following responses: (not screaming)
I do not want to do it myself with the mysql tables. I want to be able to call a php function that terminates another user... Is this possible? I know I can do it myself by integrating it into the app tables and programs. But don't want to do more work on it, I just want to be able to call a php function using the php session_id string provided by the session_id() function and then kill the process. Similar to the linux kill command. Does this exist in php??? Thx