Git Product home page Git Product logo

jaxl's Introduction

JAXL (Jabber XMPP Client and Component Library in PHP)

Jaxl v3.x is out. It's fast, modular, clean, flexible, oops, event based. Read More

Jaxl 2.x is an object oriented XMPP framework in PHP for developing real time applications for browsers, desktops and hand held devices. Jaxl 2.x is a robust, flexible and easy to use version of Jaxl 1.x series which was hosted at google code.

  • More robust, flexible, scalable and easy to use with event mechanism for registering callbacks for xmpp events
  • Integrated support for Real Time Web (XMPP over Bosh) application development
  • Support for DIGEST-MD5, PLAIN, ANONYMOUS, X-FACEBOOK-PLATFORM authentication mechanisms
  • 51 implemented XMPP extensions (XEP's) including MUC, PubSub, PEP, Jingle, File Transfer
  • Setup dynamic number of parallel XMPP instance on the fly
  • Monitoring, usage stat collection, rate limiting and production ready goodies

Download

  • 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

Warning: The development source code at Github is only intended for people that want to develop Jaxl or absolutely need the latest features still not available on the stable releases.

Writing XMPP apps using JAXL library

  • Download and extract inside /path/to/jaxl
  • Jaxl library provide an event based mechanism exposing hooks like jaxl_post_auth
  • Register callback(s) inside your app code for required events (see example below)
  • Write your app logic inside callback'd methods

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

// 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'=>5
));

// 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 "[email protected]" "This is a test message"

Useful Links

Generate Jaxl documentation on your system for quick reference:

phpdoc -o HTML:Smarty:PHP -ti "JAXL Documentation" -t /var/www/ -d xmpp/,xep/,env/,core/

jaxl's People

Contributors

abhinavsingh avatar asuth avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.