Yeah I want it all in one rather than tailing it to another file because that's too many things going on then. I was just showing with the tail example of what I'm after.
Just read the file into PHP, chop the bit you want (last n lines) then spit it out. Pull it in all ajaxy-like from a constantly running JS function and that's it.
Ahh ok. I think all you'd need there is file() or file_get_contents() and a bit of regex to pull out the actual chat messages. Actually, may as well use file() then recurse through the array (file() puts the lines of a file into an array) for ones which don't start with a chat message character and discard those. Shouldn't even need regex then, just strpos()