I implemented today User online script, submitted on: http://www.phpeasystep.com/phptu/9.html

At first I thought it actually does all I expected, but now I'm pretty sure it is behaving like a regular hit counter (which I already have), rather than tracking who's actually online, every 10 minutes.

Numbers just keep adding up, and I'm moderating a really low traffic website. This can't be right. It says "33 visitors online". I find this hard to believe. How do I turn this existing code into reliable tracking script?

I reckon data should be purged from database every now and then, any suggestions how do I solve this?

Thanks in advance!