This class can be used to implement a simple Web based chat system that uses AJAX to update the chat dialog display area without reloading the whole page.
The class generates a page with a Web form to submit what each chat line that the users type.
The chat lines are sent to the server using a XMLHttpRequest object.
The chat lines are received by a server side script that uses the class to store what each user entered in a MySQL database table.
In response, the class outputs the chat list already formatted to by displayed in the user browser pages.
chat.php Class The Main Class 2,662
chat.sql Data The SQL code 527
refresh.php Aux. Retrieve data from class 189
submit.php Aux. Submits data to the class 201
index.php Example Example file 69
You can download those files from phpclasses.org or from:
Download all files: ajax-chat-2006-10-06.zip (104380 bytes)