"members online" script.
Posted: Tue Feb 26, 2008 12:09 pm
I've looked everywhere, and google won't help me. =/ The scripts are either too complicated (and thus too hard on the server, I need something basic) or part of this huge thing I'd have to dissect.
All I want is when people log in to my game, for it to tick them as signed on. 15 minutes of inactivity, they're logged off. I was previously using IPB forums, but I've sinced just opted to code my own forums, and now I don't have a way to check this.
I was thinking I'd have it set "15" when they log in, and then every minute, it takes 1 away from all users with > 0 minutes logged in, and when it reaches 0, it doesn't consider them logged in anymore. This means, however, every page I'd have to set (maybe in the footer) the counter = 15 with mySQL. A whole query a page is something I don't want to do, along with a big query every one minute.
What should I do?
All I want is when people log in to my game, for it to tick them as signed on. 15 minutes of inactivity, they're logged off. I was previously using IPB forums, but I've sinced just opted to code my own forums, and now I don't have a way to check this.
I was thinking I'd have it set "15" when they log in, and then every minute, it takes 1 away from all users with > 0 minutes logged in, and when it reaches 0, it doesn't consider them logged in anymore. This means, however, every page I'd have to set (maybe in the footer) the counter = 15 with mySQL. A whole query a page is something I don't want to do, along with a big query every one minute.
What should I do?