Hmm you could do it I guess using the sessions...
main();
sub main {
#----------------------------------------------------------
# Show who is online!
my @sess = ();
my @online = ();
my $path = "/Apache/cgi-bin/admin/sessions";
my $sess = {};
opendir (DIR, $path) or die "Can't read sessions : $path : $!";
@sess = grep { /^\w+$/ } readdir(DIR);
closedir DIR;
for (@sess) {
$sess = do("$path/$_");
push @online, $sess->{username};
}
print "Content-type: text/html\n\n";
print join(', ', @online) || 'No-one';
}
I'm not sure how reliable this way is.
Code:
#!/perl/bin/perl main();
sub main {
#----------------------------------------------------------
# Show who is online!
my @sess = ();
my @online = ();
my $path = "/Apache/cgi-bin/admin/sessions";
my $sess = {};
opendir (DIR, $path) or die "Can't read sessions : $path : $!";
@sess = grep { /^\w+$/ } readdir(DIR);
closedir DIR;
for (@sess) {
$sess = do("$path/$_");
push @online, $sess->{username};
}
print "Content-type: text/html\n\n";
print join(', ', @online) || 'No-one';
}
I'm not sure how reliable this way is.