Re: best php script that counts current online users, question.
| From: | Daniel Schierbeck | Date: | Tue, 26 Oct 2004 13:35:40 +0000 |
| Subject: | Re: best php script that counts current online users, question. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200349@lists.php.net to get a copy of this message | ||
Louie Miranda wrote:
Hi, i got tired testing free php scripts that does count current online users and i could not find the best one yet. maybe someone can help me. im looking for a current counter for online users, php script that does count even if its inside a proxy with one ip. i can't find one. Dunno 'bout the proxy part, but can't you just have a MySQL table like this:id INT; ip VARCHAR(15); time DATETIME; PRIMARY KEY id Then check if the client IP exists in the table upon page load. If it does, update the timestamp. Otherwise insert a new row. After the query you delete all rows that are more than 5 or so minutes old. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/register&r=6584