Best way to store chat log data
I'm developing a PHP chatbox that should use jQuery to store data, and my question is how should I store chat logs in order to show them in my script?
Currently I'm storing them in mySQL database, but I assume that I can store them in xml, txt, or even html file on my server, so what is the most efficient way to store and parse chatlogs with PHP and jQuery?
I would use a free-form text file at the document root of your server,
with its own little index.
Index is a " "-padded chatroom user name, alongside a "0"-padded string
which is the file pointer.
First 8 bytes of the free-form file (at the pointer) give number of bytes
written for that record. Rest of the record is the chat room text.
You don't need linefeeds and it will be MEGA-fast to access compared
to lumbering your way into SQL for such a simple data recovery task.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread