how do you do to know that a user (like a phpbuilder user) is online? how do you do to know wether his session has ended or not? i guess you store his/her last session_id on the db and then check wether it's close or not, but how do u check it?