Results 1 to 2 of 2

Thread: Best way to store chat log data

  1. #1
    Join Date
    Jan 2011

    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?

  2. #2
    Join Date
    May 2011
    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.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center