WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

I've published a basic PHP library to connect to XMPP and BOSH (for chat)

Submitted by barnettech on Fri, 04/13/2012 - 12:23

https://github.com/barnettech/PHP_SPEAKS_XMPP is a basic PHP script to connect to BOSH to speak with XMPP servers. WRITTEN BY: James Barnett 2012 jbarnett@barnettech.com SCRIPTS PURPOSE: A simple php script illustrating how to connect to a BOSH server to send stanzas, payloads, etc. to communicate with xmpp servers -- specifically I wrote this script to just get an rid and sid to then attach() to Strophe the XMPP javascript library as described in the book PROFESSIONAL XMPP -- replace the jid, username, and passwords in the code with your own, it is hardcoded for now -- sorry. -- replace the test bosh server with your own -- right now it sends a test message as well. -- modify the code to fit your needs USAGE: -- after changing the jid, password, and username, etc as described above just run this script from the command line ie: > php bosh.php The code will eventually be a part of a Drupal module http://drupal.org/project/jabber I recently took over this drupal namespace.