- Joined
- Aug 15, 2008
- Messages
- 489
- Reaction score
- 43
Hello.
I followed a tutorial about how to make a visitors online page. I got it fully working, but I would like to make few changes to it, but I am not sure how to do them, so I hope someone of you could help me.
So, the script looks right now like this:
So it just gets the count of visitors viewing the website, but I would like to get it to get visitors those are in a server. So like from port 3306.
I followed a tutorial about how to make a visitors online page. I got it fully working, but I would like to make few changes to it, but I am not sure how to do them, so I hope someone of you could help me.
So, the script looks right now like this:
Code:
<?php
session_start();
$session_path = session_save_path();
$visitors=0;
$handle = opendir(session_save_path());
while (($file = readdir($handle)) != FALSE)
{
if ($file!="."&&$file!="..")
{
if(ereg("^sess",$file))
$visitors++;
}
}
echo "There are $visitors visitors online.";
?>
So it just gets the count of visitors viewing the website, but I would like to get it to get visitors those are in a server. So like from port 3306.

