ShoutChat

ShoutChat is a PHP script, released under the LGPL license, which gives developers the capability to add an instant messaging module to their web sites. It uses an early version of AJAX (long before the hype), and will operate in most modern browsers. By using this tool, simultaneous web site visitors are able to chat with one another, in real time, without any prior arrangements. Example uses include web sites for weblogs, projects and discussion boards.

The ShoutChat module is implemented as an IFRAME element (primary to have more control over scrolling). The client part communicates with the server part through the use of client-side Javascript (XMLHttpRequest). The messages are then stored in a MySQL database, which is then queried for updates. The look of the box can be customized primarily by using CSS.

ShoutChat handles some of the details that other chat scripts leave out. When a new message is posted, the message frame scrolls down so that any new messages come into view. ShoutChat also checks for new messages using a client-server model. The query for new messages is done using HTTP HEAD requests once every 10 seconds for the first 30 seconds and then exponetially by powers of 2 from there on out (an algorithm which can be configured). When the mouse is moved over the ShoutChat region of the web page, this cycle starts over. This allows for new messages to be displayed immediately to all active users, while tapering off the rate of checking for message by inactive clients to reduce server load. Without these very important features, a converstation on a website is much more cumbersome.

Now that AJAX has finally hit the mainstream, this program is no longer anything out of the ordinary. However, one could argue that it was certain ahead of its time. This chat application is described in a nutshell in the java.net article Developing AJAX Applications the Easy Way. As an exercise, ShoutChat will be reimplemented using DWR and a new version will finally be released.

Releases

Version Release Focus Date Link
0.1.8 Name change; database redesign 2005/04/27 [ Download ]
0.1.7 FastFormat improvements 2003/01/09 [ Download ]
0.1.6 User interface enhancements, added FastFormat 2003/01/09 [ Download ]
0.1.5 Chat enchancements, fixed magic quotes bug 2003/01/06 [ Download ]
0.1.4 Feature enhancements, xhtml compliance 2003/01/05 [ Download ]
0.1.3 Fixed infinite loop, added auto links 2003/01/04 [ Download ]
0.1.1 User interface improvements 2003/01/04 [ Download ]
0.1.0 Initial release 2003/01/04 [ Download ]

Testimonials

Read what people are saying about Shoutchat!

kellybelly:

(I like) the refresh feature. A lot of the other scripts have META-refreshes, which (IMHO) can eat up bandwidth if it's left open for an extended period of time. (It also has) nice archiving.

djCL:

All in all, great program, well implemented. This is going to be copied. It will be one of those things that show up on any site.

ShoutChat In Action