<taken from me on Chatspot site
Here is the latest Chatspot revision note:
Changeset [178] by Techboy
I did something with the xmlhttprequest stuff - I think it's pretty clever
The XMLHTTPRequest would always output the response to browser even if it wasnt actually a poll. So - when HTTP returns a response it has a status number at the top of the header. I used this status number to tell the library what Chatspot was returning. HTTP/1.1 999 Chatspot Poll OK 
So, here's what the XMLHTTPRequest library code for that is:
In the file where the response is generated and returned:
Code:
****if ($_GET['action']=='poll') *
****{
*header('HTTP/1.1 999 Chatspot Poll OK');
*// Your code here
****}
In the XMLHTTPRequest Jscript:
Code:
****// We choose what we do depending on the "error" code the reqlib returns - clever huh? :> *
****if (req.status == 999) // Polling *
****{
*// What we do on a poll goes here
****}
Hope somebody finds that useful
Bookmarks