You can build a very simple PHP chat room with jQuery's AJAX functionality if you don't want to bother with the complexity of COMET. Regardless of what the server side API looks like, you can probably interact with it using jQuery from the client.
Clients can poll the server using jQuery code like this:
$(document).everyTime(pillowchat.settings.message_poll_frequency, function() {
if(pillowchat.state.poll == true){
getMessages();
}
});
jQuery POST requests could be sent like this:
$.post("chat.php", {
"attribute":"important string"
},
function(data){
response = JSON.parse(data);
processNewMessages(response);
});
They could be requests for new messages, active users, or contain new messages from the client.
The API on the server can be implemented a million different ways. I wrote a simple chat using PHP and CouchDB that worked pretty well. More detail and source code is available here: http://trillworks.com/nick/2011/08/13/pillowchat-how-not-to-build-a-chat-room-with-jquery-phpillow-and-couchdb/
I wouldn't recommend this approach if your expect more than 30 people in the room. When stress testing this design, I found apache couldn't handle all the traffic. Make sure you include some sort of flood detection.