Send message to XMPP server in php

If you are creating any chat application or wanted to send real time messages or data you simplest possible solution is XMPP. Here I'm writing the for sending the messages on XMPP server in PHP. I'm using ejabbered server here. so both sender and receiver have to register themselves over the ejabbered server before sending the messages to each other. Here is the code to register the user on ejabbered XMPP server.

Here is the PHP code to send the messages.

 

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *