How to write External Jabber Components in PHP using Jaxl library?

Posted 16 CommentsPosted in XMPP
Jabber Component Protocol (XEP-0114) documents how XMPP protocol can be used to communicate between servers and "external" components over the Jabber network. XMPP components "bind" to a domain, usually a sub-domain of the main XMPP service, such as service.example.org. All incoming stanzas addressed to that domain (to='service.example.org') or to entities on that domain (to='[email protected]') will be routed to your Jaxl (Jabber XMPP Library) based code. In this blog post, I will demonstrate a sample external jabber component bot written in PHP using Jaxl library. Refer Jaxl Installation, Usage guide and Example apps if you are new to Jaxl. Demonstrated component...

XEP 0045 – Multi User Chat (MUC) available methods in Jaxl 2.0

Posted 40 CommentsPosted in XMPP
Jaxl 2.0.3 (Jabber XMPP Library in PHP) comes with 15 XMPP extensions including XEP-0045 a.k.a. Multi-User Chat (Conference Room). In this blog post, we will go through all the methods available for XMPP applications developed using Jaxl library. Using MUC methods You need to include Jaxl implementation of XEP-0045 in your application code to start using the methods listed below. Refer Jaxl Installation, Usage guide and Example apps if you are new to Jaxl. Here is how this can be done at the top of your application code: // initialize Jaxl instance $jaxl = new JAXL(); // include MUC XEP...

PHP Code, Setup and Demo of Jaxl boshchat application

Posted 86 CommentsPosted in PHP, XMPP
Jaxl 2.0 bosh support allow web developers to write real time web applications within minutes, without having any pre-requisite knowledge about the XMPP protocol itself. In this blog post, I will walk you through setup and demo of an XMPP based web chat application using Jaxl library. Get the code Follow the following steps to download and install this sample web application on your systems: Clone the development branch of Jaxl library [email protected]:~/git# git clone [email protected]:abhinavsingh/JAXL.git [email protected]:~/git# cd JAXL/ [email protected]:~/git/JAXL# If you are not familiar with git, simply visit [email protected], click Download Source and extract under ~/git/JAXL directory on your...

Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0

Posted 121 CommentsPosted in XMPP
Facebook chat provides two authentication mechanisms for authenticating chat client users. DIGEST-MD5 require chat client users to enter their username and password, while X-FACEBOOK-PLATFORM can be used to provide better user experience by using simple Facebook Platform authentication. In this blog post, I will demonstrate how to use Jaxl library for X-FACEBOOK-PLATFORM authentication. Echobot using X-FACEBOOK-PLATFORM Setup Jaxl library on your system and edit packaged sample echobot application with facebook user account details. Alternately you can also specify connecting user details inside jaxl.ini configuration file. $jaxl = new JAXL(array( 'user'=>'fbUsername', 'pass'=>'', // Not required, we will use user session key...

XEP 0133 – Service Administration available methods in Jaxl 2.0

Posted 4 CommentsPosted in XMPP
Jaxl 2.0 implements more than 10 XMPP extensions including XEP-0133 a.k.a. Service Administration. In this blog post, we will go through all the methods available for use in XMPP applications developed using Jaxl. Using Service administration methods You need to include Jaxl implementation of XEP-0133 in your application code to start using below listed available methods. Here is how this can be done at the top of your application code: // initialize jaxl instance $jaxl = new JAXL(); // include service administration $jaxl->requires('JAXL0133'); // or jaxl_require('JAXL0133', $jaxl); Service administration available methods Below is a detailed list of methods from service...

Jaxl 2.0 Core classes, available methods and directory structure

Posted 4 CommentsPosted in XMPP
In this blog post we will dig deep into the core of Jaxl 2.0 - An XMPP framework written in PHP. Specifically, we will go through Jaxl core directory structure. Towards the end we will get familiar with various core classes and their available methods (e.g. $jaxl->sendMessage()), that developers can use in their XMPP applications. Core Directory Structure Now that you have the source code, lets get familiar with the Jaxl directory structure. Downloaded source code consists of following 5 directories: xmpp: Contain core stack which implements XMPP rfc's. All files follow naming convention like xmpp.*.php core: Contains core stack...

Writing a command line XMPP bot (echobot) using Jaxl 2.0

Posted 44 CommentsPosted in XMPP
In this blog post, we will write a sample XMPP bot (echobot) using Jaxl 2.0. In turn we will introduce ourselves to some of the basic functionality we can do using Jaxl e.g. fetching roster list, subscribing and unsubscribing to a user presence, etc. We will also focus on how to use XMPP extensions (XEP's) inside our echobot code. Specifically, we will make use of XEP-0085 (chat state notification), XEP-0203 (delayed delivery) and XEP-0092 (software version) in our sample echobot application. Echobot source code: This sample echobot application comes packaged with Jaxl 2.0. If you have already read Installation, Usage...

Jaxl 2.0 – Installation, Usage guide and Example apps

Posted 48 CommentsPosted in XMPP
This blog post provides detailed instructions on how to download and setup Jaxl 2.0 for quick XMPP application development using PHP. We will also see how to run XMPP bots using Jaxl command line utility (now available by just typing jaxl on the terminal). Get the source code Jaxl 2.0 development version source code is available at github. For better experience download latest stable tarball from google code The development version of Jaxl is hosted here at Github, have fun cloning the source code with Git. If you are not familar with Git just use the download button to get...

Releasing Jaxl 2.0 – Object oriented XMPP framework in PHP

Posted 7 CommentsPosted in Open Source, PHP, XMPP
After months of restructuring the Jaxl library, I am pleased to announce Jaxl 2.0, an object oriented XMPP framework in PHP for developing real time applications for browsers, desktops and hand held devices. What's new in Jaxl 2.0? A lot of structural changes has been done from the previous version to make it more scalable, robust, flexible and easy to use Library now provides an event mechanism, allowing developers to register callbacks for various xmpp events in their application code Use integrated BOSH support to write real time web applications in minutes More than 10 new implemented XMPP extensions (XEP's)...