A function or a function call to indicate the amount of online user.
Moderators: OldWolf, re*s.t.a.r.s.*2
$users = array();
$dir = "your/phpfreechat/path/data/private/chat/yourchannelname/nicknames/";
$dir_handle = opendir($dir);
while (false !== ($file = readdir($dir_handle)))
{
if ($file == "." || $file == "..") continue; // skip . and .. generic files
if (time() > (filemtime($dir.$file)+10) ) // do not count 10 seconds oldest user
continue;
$users[] = urldecode(base64_decode($file));
}
$nd_users = count($users);
DaveS wrote:Why are the usernames encrypted in the nickname directory?
I was going to modify you script above to provide a "lobby" to my users, where the could see WHO was in the chatroom before actually entering it.... as well as of course the count
Return to Feature Requests (v1.x)
Users browsing this forum: No registered users and 3 guests