if all you want a is a list of active users then why not just every time the user logins it updates the database adding the current login date into the database..
then you will have the current date in a login field in a database, this you can now have a page that can show al lthe users and be filtered be the login date. Filter the login date that matches the current date.
then lets say the user doesnt logout then have the php just check the data in the database and if its over a certain time frame just have it auto maticly set it to offline etc..
like
if ($logindate < $todaysdate) {
echo "offline";
} else {
echo "online";
}
somthing like that...