I was experimenting with CGI::Push and came up with a really CUFP. It's tiny, but oh-so-neat and I'm not sure why I haven't stumbled upon this before on the web.
It updates the browser every second. It's too bad IE doesn't conform to standards, I think this (server push) could've led to some neat web services.
You will most likely need to edit it to point to your access_log.
#!/usr/bin/perl -w use strict; use CGI::Push qw(:standard); use CGI::Carp qw(fatalsToBrowser); use CGI::Carp qw(warningsToBrowser); do_push( -type => "text/plain", -nph => 0, -delay => 1, -next_page => sub { return `uptime`, "\n", `tail /var/www/logs/access_log`, "\n", `ps auxw`; }, );
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: Server status through HTTP using CGI::Push
by merlyn (Sage) on Apr 15, 2003 at 03:50 UTC | |
by Aristotle (Chancellor) on Apr 15, 2003 at 19:01 UTC | |
Re: Server status through HTTP using CGI::Push (multiple parameters to import())
by Aristotle (Chancellor) on Apr 15, 2003 at 01:02 UTC | |
Re: Server status through HTTP using CGI::Push (HTML version)
by itodd (Acolyte) on Apr 15, 2003 at 17:56 UTC | |
Re: Server status through HTTP using CGI::Push
by meredith (Friar) on Apr 17, 2003 at 19:16 UTC |
Back to
Cool Uses for Perl