I wrote the chat tutorial at Dynamic AJAX, and you could modify it to use a flat file or XML file fairly easily. I would recommend using an XML file, then you can just add messages to it programmatically using the XMLDOM. The only work that you would have to do would be on the back end PHP file, and everything else should just work.
You might run into a little tedious logic trying to figure out the last message the user recieved and pulling apart the rest. But it shouldn't be too bad using the XMLDOM.
Let me know if you have any questions.
|