Managing chat requests in a php-based website

hi

my question is how would you implement chat requests in a php-based website using a xiff3-based client? i am getting crazy trying to achieve this since months now

the way the website works is simple :

  • A sends a chat request to B
  • B accepts => XIFF client loads in a popup for both A & B
  • C sends a chat request to B
  • B accepts => C is added in the XIFF client’s contacts list for B => no need to reload the popup for B (but must be loaded for C)
  • etc.

Okay, it seems simple.

The way my (or I guess any) XIFF client works now is by loading the roster of each connected member.
So for sending chat requests in php, I am using the Jabber Class here : http://code.blitzaffe.com/pages/phpclasses/files/jabber_client_52-11
The problem is that once I connect using the php class to add the request sender in the receiver’s roster, it disconnects the sender and he/she looks offline for users who are already chatting with him/her.

Do you have a better idea for how to handle this situation please?

any suggestion please?