What is Jaxl?

Free & open source, object oriented XMPP library in PHP for developing real time applications for browsers, desktops and hand held devices

Though generic in nature, Jaxl was initially written for developing command line XMPP clients and external jabber components bots. Since version 2.x Jaxl library provides integrated support for developing real time web applications

  • Robust, flexible, scalable and easy to use
  • Event mechanism for callbacks on XMPP events
  • Integrated support for web application
  • 32 implemented XMPP extensions
  • Setup dynamic parallel XMPP sessions
  • Monitoring, usage stats, rate limiting support

Jaxl Library Users

Download Jaxl Library

The latest stable Jaxl library release is
v2.1.2
Changelog

Quick Example

Here is how a simple send chat message app looks like using Jaxl library:

  1. Download and extract inside /path/to/jaxl
  2. Jaxl library provide an event based mechanism exposing hooks like jaxl_post_auth
  3. Register callback(s) inside your app code for required events (see example below)
  4. Write your app logic inside callback'd methods
// Include and initialize Jaxl core
require_once
'/path/to/jaxl/core/jaxl.class.php';
$jaxl
= new JAXL(array(
   
'user'=>'username',
   
'pass'=>'password',
   
'host'=>'talk.google.com',
   
'domain'=>'gmail.com',
   
'authType'=>'PLAIN',
   
'logLevel'=>4
));

// Send message after successful authentication
function postAuth($payload, $jaxl) {
   
global $argv;
    $jaxl
->sendMessage($argv[1], $argv[2]);
    $jaxl
->shutdown();
}

// Register callback on required hook (callback'd method will always receive 2 params)
$jaxl
->addPlugin('jaxl_post_auth', 'postAuth');

// Start Jaxl core
$jaxl
->startCore('stream');

Run from command line:

php sendMessage.php "anotherUser@gmail.com" "This is a test message"`

Got a Question?

Bug and Issues

Facing any issues? Raise a bug here or look for a solution in already fixed bugs list

Discussion and Help

Start a new discussion/help thread using this form

Author Blog

Feel free to drop a comment on author blog