I'm coding a forum, and I want users to receive a virtual coin for every minute they're online. I got the session up and working. So far there's a forum where users are able to post and reply threads.
About the coin system, my first problem is that I want to avoid users to abuse the system, so I want a 30 minutes timeout for the session.
Secondly, how do I determine how long the session has been active in PHP?