HomeReportsToolsPortfolioBioContact
AJAX Tail Implementation

If you're new here, you may want to subscribe to my RSS feed, follow me on Twitter or sign up to my email list.

If you want to talk about how I can help with your social & viral marketing campaigns, contact me. Thanks!


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, share it:
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook
  • LinkedIn
  • Mixx
  • Pownce
  • TwitThis

Contact me to talk about what I can do to help your viral & social marketing campaigns, and don't forget to subscribe to my feed, join my email list or follow me on Twitter to stay up to date.


COMMENTS / 2 COMMENTS

[...] 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 [...]

PHP Ajax Tail Implimentaion » Dan Zarrella added these pithy words on Aug 08 06 at 9:05 am

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

Regards,
=MrR=

Mr.Ripley added these pithy words on May 10 06 at 6:59 pm

SPEAK / ADD YOUR COMMENT
Comments are moderated.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top