AJAX Tail Implementation

Posted on Apr 16th, 2006
Share 


I just whipped up a little PHP script that impliments the *nix command tail via AJAX in a browser, using any file available through a URL. This is useful for watching log files, because it will reverse the order of the file, that is, print what is being written to the bottom of the log file to the top of the browser window for easy viewing. The script uses AJAX to push the updates to the file through to the browser every 10 seconds. To use your file, just subsitutute your file ‘s URL for the text.txt URL given into the following URL:
http://www.danzarrella.com/tail.php?file=http://www.danzarrella.com/test.txt

If you liked this post, don't forget to subscribe to my RSS feed or my email newsletter so you never miss the science.

View Comments to “AJAX Tail Implementation”

  1. Mr.Ripley Says:

    Hello,
    I am just thinking about similar script. Would you please share source of tail.php with me for learning purposes? ;-)

    Regards,
    =MrR=

  2. PHP Ajax Tail Implimentaion » Dan Zarrella Says:

    [...] A while back I linked to a demo of a script I wrote implementing the unix command tail (Like for watching the data being appended to a file), so I could tail a log file. I finally got around to posting the source code. You’ll need saja the secure ajax for PHP framework and my saja.functions.php file as well as the actual output page, tail.php. As with most of my code its icky and hackish, but it works. For me at least. Posted by Dan Zarrella Filed in AJAX, PHP Related Posts:AJAX Tail ImplementationDoes the 80/20 Rule Apply to Keyword Traffic?The Short Head is not because of Economics and a PHP ngram tokenizerCumulative Percentage Curves of Keyword Niches [...]

Leave a Reply

blog comments powered by Disqus

Get my 22 page report full of scientifically proven ways to get more ReTweets by subscribing to my blog via email.

the social media marketing book

Key Posts

Recent Posts

Topics

Blogroll

Copyright © 2010 by Dan Zarrella, social media marketing and viral marketing consultant. All rights reserved. site map

DanZarrella.com, Social & Viral Marketing Scientist