I have a php file that prints the last 50 lines of a txt file. However, this file gets appended every second and would like to view a \"live feed\" of the action. How can th
With ajax. If you need cross-browser compatibility, replace the AJAX function I provided with one from a library like jQuery.
You will have to create a php file called myphpfile.php (or change the code above to reference the correct file) and put the following in it (as taken from your question):
', $output); //add newlines
?>