[thelist] tail -f on a web page.

Rick den Haan rick.denhaan at gmail.com
Thu Jan 25 06:10:33 CST 2007

Raoul Snyman schreef:
> Hi,
>> I wanted to display that on a web page. How can i do it via php ? and what
>> is the best way to do it ?
> Depending on how PHP, Apache and your server are set up, you might be able to use exec('tail -f /var/log/apache2/access.log'); or a similar command (can't think of the right one at the moment) which will return you the output of the command.
Do you mean using the backtick?

$sLogs = `tail -f /var/log/apache2/access.log`;

More information about the thelist mailing list