[thelist] tail -f on a web page.

Raoul Snyman raoul.snyman at saturnlaboratories.co.za
Thu Jan 25 06:02:56 CST 2007


> 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. You'll most probably then need to refresh the page every 5 seconds or so to display the latest messages.


Raoul Snyman
Saturn Laboratories
raoul.snyman at saturnlaboratories.co.za

More information about the thelist mailing list