I'm working on a project that parses tweets and saves them to a db. I'd also like to create a local, front end interface that will live update when the tweet comes in (no page reloads etc.) I'm using the basic AJAX/PHP polling model seen here. But what I need is:
When a tweet comes in and is parsed, for performance reasons, I'd like to write it to a .txt file, possibly just their name, handle, and the tweet. I'd like to write it in a JSON format. And I'd need php to monitor that file and pull the last entry every time a new one is appended to the text file. Is this the right way to go about it? and has anyone done this before? Thanks!