Click to See Complete Forum and Search --> : Creating a 'tail' type system on a webpage


gremin
05-01-2005, 10:54 PM
Im wondering if anyone has any ideas on how to mimic the unix 'tail -f' command using PHP (or something) on a webpage?

id10t
05-02-2005, 11:53 AM
You'd have to reload the page every so often using javascript (set a timeout) or a meta refresh tag.

Get the output from your command, store it in an array, and display the last N rows.

gremin
05-02-2005, 06:16 PM
Yea - been working down that path, but i really want the data to display as the file changes and to scroll rather than reload... its very hard to read when it refreshes - thus kind of killing what the function is for in the first place... Any suggestions are welcome. A java appelt maybe?

goldbug
05-02-2005, 06:47 PM
AJAX (http://www.adaptivepath.com/publications/essays/archives/000385.php) perhaps?

Also: SAJAX (http://www.modernmethod.com/sajax/)