<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abhi&#039;s Weblog &#187; JAXL</title>
	<atom:link href="http://abhinavsingh.com/blog/tag/jaxl/feed/" rel="self" type="application/rss+xml" />
	<link>http://abhinavsingh.com/blog</link>
	<description>PHP, Memcached, XMPP and Web Development</description>
	<lastBuildDate>Sat, 04 Sep 2010 10:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to write External Jabber Components in PHP using Jaxl library?</title>
		<link>http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 11:58:39 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Bots]]></category>
		<category><![CDATA[Component]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=985</guid>
		<description><![CDATA[
			
				
			
		
Jabber Component Protocol (XEP-0114) documents how XMPP protocol can be used to communicate between servers and &#8220;external&#8221; components over the Jabber network. XMPP components &#8220;bind&#8221; 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='user@service.example.org') will be [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fhow-to-write-external-jabber-components-in-php-using-jaxl-library%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fhow-to-write-external-jabber-components-in-php-using-jaxl-library%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Bots,Component,Documentation,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>Jabber Component Protocol (<a href="http://xmpp.org/extensions/xep-0114.html">XEP-0114</a>) documents how XMPP protocol can be used to communicate between servers and &#8220;external&#8221; components over the Jabber network. XMPP components &#8220;bind&#8221; to a domain, usually a sub-domain of the main XMPP service, such as <code>service.example.org</code>.</p>
<p>All incoming stanzas addressed to that domain (<code>to='service.example.org'</code>) or to entities on that domain (<code>to='user@service.example.org'</code>) 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.</p>
<p>Refer <a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">Jaxl Installation, Usage guide and Example apps</a> if you are new to Jaxl. Demonstrated component bot code can be obtained from <a href="http://github.com/abhinavsingh/JAXL/tree/master/app/componentbot/">Jaxl@github</a>. </p>
<p><strong style="font-size:18px;"><u>Using Jabber Component Protocol</u></strong><br />
Include Jaxl implementation of XEP-0114 in your application code to setup necessary environment for using Jabber component protocol. Here is how this can be done at the top of your application code:
<pre class="php" name="code">        // Initialize Jaxl Library
        $jaxl = new JAXL(array(
                'component' => JAXL_COMPONENT_HOST,
                'port' => JAXL_COMPONENT_PORT
        ));

        // Include required XEP's
        jaxl_require('JAXL0114', $jaxl); // Jabber Component Protocol</pre>
<p><strong style="font-size:18px;"><u>Register callback for XMPP events</u></strong><br />
Above we have setup the necessary environment for writing external Jabber component bots. Next we register callback for necessary XMPP events inside our <code>componentbot</code> class.</p>
<pre class="php" name="code">
        // Sample Component class
        class componentbot {

        }

        // Add callbacks on various event handlers
        $componentbot = new componentbot();
        JAXLPlugin::add('jaxl_pre_handshake', array($componentbot, 'doAuth'));
        JAXLPlugin::add('jaxl_post_handshake', array($componentbot, 'postAuth'));
        JAXLPlugin::add('jaxl_get_message', array($componentbot, 'getMessage'));
</pre>
<p><strong style="font-size:18px;"><u>Component bot class</u></strong><br />
Finally, lets complete the missing pieces inside <code>componentbot</code> class.</p>
<pre class="php" name="code">
        // Sample Component class
        class componentbot {

                function doAuth() {
                        $jaxl->log("Going for component handshake ...", 1);
                        return JAXL_COMPONENT_PASS;
                }

                function postAuth() {
                        $jaxl->log("Component handshake completed ...", 1);
                }

                function getMessage($payloads) {
                        global $jaxl;

                        // echo back
                        foreach($payloads as $payload) {
                                $jaxl-&gt;sendMessage($payload['from'], $payload['body'], $payload['to']);
                        }
                }

        }
</pre>
<p><strong style="font-size:18px;"><u>Configure, Setup and Run</u></strong><br />
If you have a local &#8220;<a href="http://www.process-one.net/en/ejabberd/">ejabberd</a>&#8221; installed, add following lines inside <code>ejabberd.cfg</code> to make example component bot to work:
<pre class="php" name="code">  {5559, ejabberd_service, [
                          {host, "component.localhost", [{password, "pass"}]}
                           ]},</pre>
<p>Update <code>jaxl.ini</code> if you choose to have different password, port or host name above:
<pre class="php" name="code">        // Connecting jabber server details
        define('JAXL_HOST_NAME', 'localhost');
        define('JAXL_HOST_DOMAIN', 'localhost');

        // Component bot setting
        define('JAXL_COMPONENT_HOST', 'component.'.JAXL_HOST_DOMAIN);
        define('JAXL_COMPONENT_PASS', 'pass');
        define('JAXL_COMPONENT_PORT', 5559);</pre>
<p>Finally, run from command line:
<pre class="php" name="code">root@ubuntu:~/usr/share/php/jaxl/app/componentbot# jaxl componentbot.php
[15008] 2010-08-24 01:40:03 - Socket opened to the jabber host localhost:5559 ...</pre>
<p>Tail jaxl.log for details:
<pre class="php" name="code">[15008] 2010-08-24 01:40:04 - Going for component handshake ...

[15008] 2010-08-24 01:40:04 - [[XMPPSend]] 63
&lt;handshake&gt;4d6c2e762d5ba5dca2cbd3a90a4deeb6a6fa0838&lt;/handshake&gt;

[15008] 2010-08-24 01:40:05 - [[XMPPGet]]
&lt;handshake/&gt;

[15008] 2010-08-24 01:40:05 - Component handshake completed ...
</pre>
<p>Log into your Ejabberd with a client and send a message to anything@component.localhost &#8211; You should receive an instant response back &#8211; congratulations!</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fhow-to-write-external-jabber-components-in-php-using-jaxl-library%2F","http:\/\/xmpp.org\/extensions\/xep-0114.html","http:\/\/github.com\/abhinavsingh\/JAXL\/tree\/master\/app\/componentbot\/","http:\/\/www.process-one.net\/en\/ejabberd\/"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L2hvdy10by13cml0ZS1leHRlcm5hbC1qYWJiZXItY29tcG9uZW50cy1pbi1waHAtdXNpbmctamF4bC1saWJyYXJ5Lzx3cHRiPkhvdyB0byB3cml0ZSBFeHRlcm5hbCBKYWJiZXIgQ29tcG9uZW50cyBpbiBQSFAgdXNpbmcgSmF4bCBsaWJyYXJ5Pzx3cHRiPmh0dHA6Ly9hYmhpbmF2c2luZ2guY29tL2Jsb2c8d3B0Yj5BYmhpJiMwMzk7cyBXZWJsb2c%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0045-%e2%80%93-multi-user-chat-muc-available-methods-in-jaxl-2-0/" title="XEP 0045 – Multi User Chat (MUC) available methods in Jaxl 2.0">XEP 0045 – Multi User Chat (MUC) available methods in Jaxl 2.0</a> (14)</li><li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/" title="PHP Code, Setup and Demo of Jaxl boshchat application">PHP Code, Setup and Demo of Jaxl boshchat application</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XEP 0045 – Multi User Chat (MUC) available methods in Jaxl 2.0</title>
		<link>http://abhinavsingh.com/blog/2010/08/xep-0045-%e2%80%93-multi-user-chat-muc-available-methods-in-jaxl-2-0/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/xep-0045-%e2%80%93-multi-user-chat-muc-available-methods-in-jaxl-2-0/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 14:09:47 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[JAXL]]></category>
		<category><![CDATA[MUC]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=984</guid>
		<description><![CDATA[
			
				
			
		
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0045-%25e2%2580%2593-multi-user-chat-muc-available-methods-in-jaxl-2-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0045-%25e2%2580%2593-multi-user-chat-muc-available-methods-in-jaxl-2-0%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,JAXL,MUC" height="61" width="50" /><br />
			</a>
		</div>
<p>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.</p>
<p><strong style="font-size:18px;"><u>Using MUC methods</u></strong><br />
You need to include Jaxl implementation of XEP-0045 in your application code to start using the methods listed below. Refer <a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">Jaxl Installation, Usage guide and Example apps</a> if you are new to Jaxl. Here is how this can be done at the top of your application code:
<pre class="php" name="code">// initialize Jaxl instance
$jaxl = new JAXL();

// include MUC XEP
jaxl_require('JAXL0045', $jaxl); // or simply $jaxl->requires('JAXL0045');</pre>
<p><strong style="font-size:18px;"><u>Multi-User Chat available methods:</u></strong><br />
Below is a detailed list of methods from multi-user room extension:</p>
<ul>
<li>$jaxl->JAXL0045(&#8216;joinRoom&#8217;, $jid, $roomJid.&#8221;/&#8221;.$nick, $history=0, $type=&#8217;seconds&#8217;)</li>
<li>$jaxl->JAXL0045(&#8216;exitRoom&#8217;, $jid, $roomJid)</li>
<li>$jaxl->JAXL0045(&#8216;kickOccupant&#8217;, $fromJid, $nick, $roomJid, $reason=FALSE, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8216;getRoomConfig&#8217;, $jid, $roomJid, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8217;setRoomConfig&#8217;, $jid, $roomJid, $fields, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8216;grantOwnerPrivileges&#8217;, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8216;revokeOwnerPrivileges&#8217;, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8216;grantAdminPrivileges&#8217;, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)</li>
<li>$jaxl->JAXL0045(&#8216;removeAdminPrivileges&#8217;, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)</li>
</ul>
<p>All parameters are mandatory to be passed while calling the above available methods. To be continued as more method gets added like <code>banUser</code>, <code>destroyRoom</code>, etc.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0045-%25e2%2580%2593-multi-user-chat-muc-available-methods-in-jaxl-2-0%2F"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L3hlcC0wMDQ1LSVlMiU4MCU5My1tdWx0aS11c2VyLWNoYXQtbXVjLWF2YWlsYWJsZS1tZXRob2RzLWluLWpheGwtMi0wLzx3cHRiPlhFUCAwMDQ1IOKAkyBNdWx0aSBVc2VyIENoYXQgKE1VQykgYXZhaWxhYmxlIG1ldGhvZHMgaW4gSmF4bCAyLjA8d3B0Yj5odHRwOi8vYWJoaW5hdnNpbmdoLmNvbS9ibG9nPHdwdGI%2BQWJoaSYjMDM5O3MgV2VibG9n";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li><li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/" title="PHP Code, Setup and Demo of Jaxl boshchat application">PHP Code, Setup and Demo of Jaxl boshchat application</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/xep-0045-%e2%80%93-multi-user-chat-muc-available-methods-in-jaxl-2-0/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>PHP Code, Setup and Demo of Jaxl boshchat application</title>
		<link>http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 10:13:42 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Bosh]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=676</guid>
		<description><![CDATA[
			
				
			
		
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fphp-code-setup-and-demo-of-jaxl-boshchat-application%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fphp-code-setup-and-demo-of-jaxl-boshchat-application%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Bosh,Documentation,JAXL,PHP,XMPP" height="61" width="50" /><br />
			</a>
		</div>
<p>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.</p>
<p><strong style="font-size:18px;"><u>Get the code</u></strong><br />
Follow the following steps to download and install this sample web application on your systems:</p>
<ul>
<li>Clone the development branch of Jaxl library
<pre class="php" name="code">root@ubuntu:~/git# git clone git@github.com:abhinavsingh/JAXL.git
root@ubuntu:~/git# cd JAXL/
root@ubuntu:~/git/JAXL#</pre>
<p> If you are not familiar with git, simply visit <a href="http://github.com/abhinavsingh/JAXL">JAXL@github</a>, click <strong>Download Source</strong> and extract under <code>~/git/JAXL</code> directory on your system</li>
<li>Once inside Jaxl source directory, build the latest development package
<pre class="php" name="code">root@ubuntu:~/git/JAXL# ./build.sh
building...</pre>
</li>
<li>Install Jaxl library (<a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">view installation detail and options</a>)
<pre class="php" name="code">root@ubuntu:~/git/JAXL# ./build.sh install
uninstalling old package...
installing...</pre>
</li>
</ul>
<p><strong style="font-size:18px;"><u>Setup web chat application</u></strong><br />
Jaxl library is default installed under <code>/usr/share/php/jaxl</code> folder. Application code for our web chat application can be found under <code>/usr/share/php/jaxl/app/boshchat</code> folder.</p>
<p>Follow these steps to setup web chat application on your system:</p>
<ul>
<li>I assume you have <code>http://localhost/</code> configured on your local web server and it runs out of <code>/var/www</code> folder. Create following symlinks:
<pre class="php" name="code">root@ubuntu:~/git/JAXL# cd /var/www
root@ubuntu:/var/www# ln -s /usr/share/php/jaxl/app/boshchat/boshchat.php index.php
root@ubuntu:/var/www# ln -s /usr/share/php/jaxl/app/boshchat/jaxl.ini jaxl.ini
root@ubuntu:/var/www# ln -s /usr/share/php/jaxl/env/jaxl.js jaxl.js
root@ubuntu:/var/www# ln -s /usr/bin/jaxl jaxl.php</pre>
<p> Edit/Remove <strong>#!/usr/bin/env php</strong> inside <code>jaxl.php</code> if it causes any problem on your system.</li>
<li>Open and edit jaxl.ini
<pre class="php" name="code">define('JAXL_BOSH_COOKIE_DOMAIN', false);</pre>
</li>
<li>I assume you have access to XMPP over Bosh enabled jabber server. Ejabberd users can verify this by hitting <code>http://localhost:5280/http-bind</code> in the browser</li>
<li>Open and edit index.php
<pre class="php" name="code">define('BOSHCHAT_ADMIN_JID', 'admin@localhost');</pre>
<p> All messages sent using this web chat application will be routed to <code>BOSHCHAT_ADMIN_JID</code></li>
</ul>
<p><strong style="font-size:18px;"><u>Ready for the demo</u></strong><br />
To run this example web chat application, visit <code>http://localhost</code> in your browser window. Enter a username/password already registered on your jabber server and press connect.</p>
<p>Login as <code>BOSHCHAT_ADMIN_JID</code> using a desktop client, so that you can receive messages sent from the browser on your desktop client.</p>
<p>Below is a screenshot when I logged in as &#8220;abhinavsingh&#8221; from browser and <code>BOSHCHAT_ADMIN_JID</code> was set to &#8220;jaxl@jaxl.im&#8221;:</p>
<p><a href="http://abhinavsingh.com/blog/wp-content/uploads/2010/08/jaxl-bosh-chat-screenshot.jpg" style="margin-top:20px;"><img style="margin-top:10px;" src="http://abhinavsingh.com/blog/wp-content/uploads/2010/08/jaxl-bosh-chat-screenshot.jpg" alt="" title="jaxl-bosh-chat-screenshot" width="710" height="430" class="aligncenter size-full wp-image-954" /></a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fphp-code-setup-and-demo-of-jaxl-boshchat-application%2F","http:\/\/github.com\/abhinavsingh\/JAXL"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L3BocC1jb2RlLXNldHVwLWFuZC1kZW1vLW9mLWpheGwtYm9zaGNoYXQtYXBwbGljYXRpb24vPHdwdGI%2BUEhQIENvZGUsIFNldHVwIGFuZCBEZW1vIG9mIEpheGwgYm9zaGNoYXQgYXBwbGljYXRpb248d3B0Yj5odHRwOi8vYWJoaW5hdnNpbmdoLmNvbS9ibG9nPHdwdGI%2BQWJoaSYjMDM5O3MgV2VibG9n";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/releasing-jaxl-2-0-object-oriented-xmpp-framework-in-php/" title="Releasing Jaxl 2.0 &#8211; Object oriented XMPP framework in PHP">Releasing Jaxl 2.0 &#8211; Object oriented XMPP framework in PHP</a> (6)</li><li><a href="http://abhinavsingh.com/blog/2010/01/jaxl-bosh-demo-im-chat-client-for-all-wordpress-blogs/" title="JAXL BOSH Demo: IM chat client for all Wordpress blogs">JAXL BOSH Demo: IM chat client for all Wordpress blogs</a> (30)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-real-time-system-server-load-notification-on-any-im-using-php-and-xmpp/" title="Get real time system &amp; server load notification on any IM using PHP and XMPP">Get real time system &amp; server load notification on any IM using PHP and XMPP</a> (17)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-lyrics-for-any-song-using-xmpp-and-php-right-into-your-im-add-lyricsflygtalkbots-com/" title="Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com">Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com</a> (15)</li><li><a href="http://abhinavsingh.com/blog/2009/01/introducing-jaxl-open-source-jabber-xmpp-library/" title="Introducing JAXL &#8211; Open Source Jabber XMPP Library">Introducing JAXL &#8211; Open Source Jabber XMPP Library</a> (81)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</title>
		<link>http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 12:42:32 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=913</guid>
		<description><![CDATA[
			
				
			
		
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Ffacebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Ffacebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,Facebook,Guide,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>Facebook chat provides two authentication mechanisms for authenticating chat client users. <code>DIGEST-MD5</code> require chat client users to enter their username and password, while <code>X-FACEBOOK-PLATFORM</code> 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.</p>
<p><strong style="font-size:18px;"><u>Echobot using X-FACEBOOK-PLATFORM</u></strong><br />
<a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">Setup Jaxl library</a> on your system and edit packaged <a href="http://github.com/abhinavsingh/JAXL/tree/master/app/echobot/">sample echobot application</a> with facebook user account details. Alternately you can also specify connecting user details inside <code>jaxl.ini</code> configuration file.
<pre class="php" name="code">
        $jaxl = new JAXL(array(
                'user'=>'fbUsername',
                'pass'=>'', // Not required, we will use user session key instead
                'host'=>'chat.facebook.com',
                'domain'=>'chat.facebook.com'
        ));</pre>
<p>Add callback for hook <code>jaxl_get_facebook_key</code>:
<pre class="php" name="code">JAXLPlugin::add('jaxl_get_facebook_key', array($echobot, 'getFacebookKey'));</pre>
<p>Complete <code>getFacebookKey</code> method inside echobot application, which should return back following key information:
<pre class="php" name="code">function getFacebookKey() {
                        return array(
                                '', // Your application secret key
                                '', // Your application api key
                                '' // Connecting user session key
                        );
                }</pre>
<p>Update <code>doAuth</code> method to use <code>X-FACEBOOK-PLATFORM</code> auth mechanism:
<pre class="php" name="code">                function doAuth($mechanism) {
                        global $jaxl;
                        $jaxl->auth("X-FACEBOOK-PLATFORM");
                }</pre>
<p>Finally, run echobot from command line:</p>
<pre class="php" name="code">root@ubuntu:/usr/share/php/jaxl/app/echobot# jaxl echobot.php
[1942] 2010-08-08 05:35:10 - Socket opened to the jabber host chat.facebook.com:5222 ...
[1942] 2010-08-08 05:35:11 - Performing Auth type: X-FACEBOOK-PLATFORM
[1942] 2010-08-08 05:35:26 - Auth completed...</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Ffacebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0%2F","http:\/\/github.com\/abhinavsingh\/JAXL\/tree\/master\/app\/echobot\/"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L2ZhY2Vib29rLWNoYXQtY29ubmVjdC13aXRoLXgtZmFjZWJvb2stcGxhdGZvcm0tdXNpbmctamF4bC0yLTAvPHdwdGI%2BRmFjZWJvb2sgY2hhdCBjb25uZWN0IHdpdGggWC1GQUNFQk9PSy1QTEFURk9STSB1c2luZyBKYXhsIDIuMDx3cHRiPmh0dHA6Ly9hYmhpbmF2c2luZ2guY29tL2Jsb2c8d3B0Yj5BYmhpJiMwMzk7cyBXZWJsb2c%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li><li><a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/" title="Writing a command line XMPP bot (echobot) using Jaxl 2.0">Writing a command line XMPP bot (echobot) using Jaxl 2.0</a> (11)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/" title="Jaxl 2.0 &#8211; Installation, Usage guide and Example apps">Jaxl 2.0 &#8211; Installation, Usage guide and Example apps</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</title>
		<link>http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:06:20 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=899</guid>
		<description><![CDATA[
			
				
			
		
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0133-service-administration-available-methods-in-jaxl-2-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0133-service-administration-available-methods-in-jaxl-2-0%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,Guide,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>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.</p>
<p><strong style="font-size:18px;"><u>Using Service administration methods</u></strong><br />
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:
<pre class="php" name="code">// initialize jaxl instance
$jaxl = new JAXL();

// include service administration
$jaxl->requires('JAXL0133'); // or jaxl_require('JAXL0133', $jaxl);</pre>
<p><strong style="font-size:18px;"><u>Service administration available methods</u></strong><br />
Below is a detailed list of methods from service administration extension:</p>
<ul>
<li>$jaxl->JAXL0133(&#8216;addUser&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;deleteUser&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;disableUser&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;reEnableUser&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;endUserSession&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;getUserPassword&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;changeUserPassword&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;getUserRoster&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;getUserLastLoginTime&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;getUserStatistics&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;editBlacklist&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;editWhitelist&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;getUserCount&#8217;, $user, $domain, $callback, $type)</li>
<li>$jaxl->JAXL0133(&#8216;getUserList&#8217;, $user, $domain, $callback, $type)</li>
<li>$jaxl->JAXL0133(&#8217;sendAnnouncementToActiveUsers&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8217;setMOTD&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;editMOTD&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;deleteMOTD&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8217;setWelcomeMessage&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;deleteWelcomeMessage&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;editAdminList&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8216;restartService&#8217;, $user, $domain, $callback)</li>
<li>$jaxl->JAXL0133(&#8217;shutdownService&#8217;, $user, $domain, $callback)</li>
</ul>
<p><strong style="font-size:18px;"><u>Examples</u></strong><br />
All the methods expects 3 parameters as defined below:</p>
<ul>
<li><u>$user</u>: An associative array containing information about the user on whose account service administrative actions need to be taken</li>
<li><u>$domain</u>: Jabber domain to which $user belongs</li>
<li><u>$callback</u>: Specify where do you want to receive success/failure of executed service administration command</li>
<li><u>$type</u>: Required by <code>getUserCount</code> and <code>getUserList</code> methods. Allowed values are registered, disabled, online, active and idle.</li>
</ul>
<p>$user array MUST correspond to the fields in the request form for executing service administration commands. </p>
<p>Here is how to add a new user using XEP-0133:</p>
<pre class="php" name="code">$user = array(
        'jid' => 'newuser',
        'pass' => 'password',
        'email' => 'newuser@email.com',
        'fname' => 'Hello',
        'lname' => 'World'
);

$jaxl->JAXL0133('addUser', $user, 'jaxl.im', array($this, 'postAddUser'));</pre>
<p> Your application code must have a methods named &#8216;postAddUser&#8217; which will be called back by Jaxl core, when it finishes executing the command.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fxep-0133-service-administration-available-methods-in-jaxl-2-0%2F"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L3hlcC0wMTMzLXNlcnZpY2UtYWRtaW5pc3RyYXRpb24tYXZhaWxhYmxlLW1ldGhvZHMtaW4tamF4bC0yLTAvPHdwdGI%2BWEVQIDAxMzMgJiM4MjExOyBTZXJ2aWNlIEFkbWluaXN0cmF0aW9uIGF2YWlsYWJsZSBtZXRob2RzIGluIEpheGwgMi4wPHdwdGI%2BaHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZzx3cHRiPkFiaGkmIzAzOTtzIFdlYmxvZw%3D%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li><li><a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/" title="Writing a command line XMPP bot (echobot) using Jaxl 2.0">Writing a command line XMPP bot (echobot) using Jaxl 2.0</a> (11)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/" title="Jaxl 2.0 &#8211; Installation, Usage guide and Example apps">Jaxl 2.0 &#8211; Installation, Usage guide and Example apps</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jaxl 2.0 Core classes, available methods and directory structure</title>
		<link>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 11:30:50 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=728</guid>
		<description><![CDATA[
			
				
			
		
In this blog post we will dig deep into the core of Jaxl 2.0 &#8211; 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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-core-classes-available-methods-and-directory-structure%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-core-classes-available-methods-and-directory-structure%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,Guide,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>In this blog post we will dig deep into the core of Jaxl 2.0 &#8211; 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.</p>
<p><strong style="font-size:18px;"><u>Core Directory Structure</u></strong><br />
Now that you have the <a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">source code</a>, lets get familiar with the Jaxl directory structure. Downloaded source code consists of following 5 directories:</p>
<ul>
<li><strong><u>xmpp:</u></strong> Contain core stack which implements <a href="http://xmpp.org/rfcs/">XMPP rfc&#8217;s</a>. All files follow naming convention like xmpp.*.php</li>
<li><strong><u>core:</u></strong> Contains core stack which manages the library workflow. Also provides an xpath based XML parser, an event mechanism and various other utilities to the framework. All files follow naming convention like jaxl.*.php</li>
<li><strong><u>xep:</u></strong> Contains implemented XMPP extensions (<a href="http://xmpp.org/extensions/">XEP&#8217;s</a>). All files follow naming convention like jaxl.XEP-NUMBER.php</li>
<li><strong><u>env:</u></strong> Contains Jaxl main() file <strong>jaxl.php</strong>, Jaxl core configuration file <strong>jaxl.conf</strong> and application environment setup file <strong>jaxl.ini</strong>. For bosh application developers <strong>jaxl.js</strong> is a must include from this directory.</li>
<li><strong><u>app:</u></strong> Contains example applications which comes packed with Jaxl library</li>
</ul>
<p><strong style="font-size:18px;"><u>Core Classes and Available Methods</u></strong><br />
Below is a detailed list of all the core classes and available methods in developer land space:</p>
<p><strong style="font-size:14px;"><u>JAXL</u></strong><br />
This class is located inside <code>core/jaxl.class.php</code> and extends base XMPP class. Following is a list of methods available:</p>
<ul>
<li><u>__construct($config=array())</u> : Constructor can accepts following configuration parameters:
<pre class="php" name="code">$config = array(
        'user'    =>    'username', // connecting username
        'pass'    =>    'password', // connecting user password
        'host'    =>    'chat.facebook.com', // connecting jabber host
        'domain' =>   'chat.facebook.com', // connecting jabber domain
        'port'    =>    5222, // connecting jabber port
        'streamTimeout'    =>    20,
        'resource'    =>    'jaxl',
        'component' =>   'component.localhost' // connecting component bind host
)</pre>
<p>Passed parameters overwrites the configuration options specified your application configuration file jaxl.ini</li>
<li><u>auth($type)</u> : Performs authentication with the jabber server. DIGEST-MD5, PLAIN, <a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/">X-FACEBOOK-PLATFORM</a> and ANONYMOUS are the supported auth <code>$type</code></li>
<li><u>setStatus($status=FALSE, $show=FALSE, $priority=FALSE, $caps=FALSE)</u> : Update the status of connected jabber user. Pass <code>$caps=TRUE</code> for sending <a href="http://xmpp.org/extensions/xep-0115.html">entity capability</a> information while setting connected user status.</li>
<li><u>subscribe($toJid)</u></li>
<li><u>subscribed($toJid)</u></li>
<li><u>unsubscribe($toJid)</u></li>
<li><u>unsubscribed($toJid)</u></li>
<li><u>getRosterList($callback=FALSE)</u> : Fetch roster list for the connected user. See example usage inside <a href="http://github.com/abhinavsingh/JAXL/tree/master/app/echobot/">echobot</a> application.</li>
<li><u>addRoster($jid, $group, $name=FALSE)</u></li>
<li><u>updateRoster($jid, $group, $name=FALSE, $subscription=FALSE)</u></li>
<li><u>deleteRoster($jid)</u></li>
<li><u>sendMessage($to, $message, $from=FALSE, $type=&#8217;chat&#8217;)</u></li>
<li><u>$jaxl->requires($class)</u> : It is an alternative for jaxl_require($class, $jaxl).</li>
<li><u>$jaxl->xml->xmlize($xml)</u> : Use this method to convert raw XML string into an array.</li>
<li><u>$jaxl->log($log, $level)</u> : Use this method for logging purposes</li>
</ul>
<p><strong style="font-size:14px;"><u>JAXLPlugin</u></strong><br />
This class is located inside <code>core/jaxl.plugin.php</code>. Following is a list of methods available:</p>
<ul>
<li><u>add($hook, $callback, $priority=10)</u> : Register callback on available hooks</li>
<li><u>remove($hook, $callback)</u> : Un-register callback on a previously registered hooks using <code>add</code> method</li>
</ul>
<p><strong style="font-size:14px;"><u>JAXLUtil</u></strong><br />
This class is located inside <code>core/jaxl.util.php</code>. Following is a list of methods available:</p>
<ul>
<li><u>isWin()</u> : Window OS detection, return bool</li>
<li><u>getTime()</u></li>
<li><u>getBareJid($jid)</u></li>
<li><u>splitJid($jid)</u></li>
<li><u>curl($url, $type=&#8217;GET&#8217;, $headers=FALSE, $data=FALSE, $user=FALSE, $pass=FALSE)</u></li>
</ul>
<p>More methods might get added in future and will be updated here.</p>
<p><strong style="font-size:18px;"><u>Using available XEP methods</u></strong><br />
Once have included required XEP class inside your application code, either by using <code>jaxl_require('JAXLxxxx', $jaxl)</code> or by calling <code>$jaxl->requires('JAXLxxxx')</code>, you can start using the available methods inside included XEP class as follows:</p>
<pre class="php" name="code">$jaxl->JAXLxxxx('methodName', $param1, $param2, ....);</pre>
<p> e.g. If you want to call joinRoom methods of Multi-User Chat XEP-0045, you can do so by calling
<pre class="php" name="code">$jaxl->JAXL0045('joinRoom', $jid, $roomJid.'/'.$nick, $history, $seconds)</pre>
<p>. DO-NOT call the method like <del datetime="2010-08-30T16:04:20+00:00">JAXL0045::joinRoom(&#8230;)</del></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-core-classes-available-methods-and-directory-structure%2F","http:\/\/xmpp.org\/rfcs\/","http:\/\/xmpp.org\/extensions\/","http:\/\/xmpp.org\/extensions\/xep-0115.html","http:\/\/github.com\/abhinavsingh\/JAXL\/tree\/master\/app\/echobot\/"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L2pheGwtMi0wLWNvcmUtY2xhc3Nlcy1hdmFpbGFibGUtbWV0aG9kcy1hbmQtZGlyZWN0b3J5LXN0cnVjdHVyZS88d3B0Yj5KYXhsIDIuMCBDb3JlIGNsYXNzZXMsIGF2YWlsYWJsZSBtZXRob2RzIGFuZCBkaXJlY3Rvcnkgc3RydWN0dXJlPHdwdGI%2BaHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZzx3cHRiPkFiaGkmIzAzOTtzIFdlYmxvZw%3D%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/" title="Writing a command line XMPP bot (echobot) using Jaxl 2.0">Writing a command line XMPP bot (echobot) using Jaxl 2.0</a> (11)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/" title="Jaxl 2.0 &#8211; Installation, Usage guide and Example apps">Jaxl 2.0 &#8211; Installation, Usage guide and Example apps</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Writing a command line XMPP bot (echobot) using Jaxl 2.0</title>
		<link>http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 12:44:36 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=675</guid>
		<description><![CDATA[
			
				
			
		
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&#8217;s) [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fwriting-a-command-line-xmpp-bot-echobot-using-jaxl-2-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fwriting-a-command-line-xmpp-bot-echobot-using-jaxl-2-0%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,Guide,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>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&#8217;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.</p>
<p><strong style="font-size:18px;"><u>Echobot source code:</u></strong><br />
This sample echobot application comes packaged with Jaxl 2.0. If you have already read <a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/">Installation, Usage guide and Running example apps</a>, you might have even run this sample application.</p>
<p>Alternately, browse and download the sample source code from github <a href="http://github.com/abhinavsingh/JAXL/tree/master/app/echobot/">echobot app files</a></p>
<p><strong style="font-size:18px;"><u>Coding with Jaxl 2.0:</u></strong><br />
Every XMPP application developed using Jaxl 2.0, MUST have a <code>jaxl.ini</code> environment setup file inside your project directory. For example, packaged echobot sample application contains <a href="http://github.com/abhinavsingh/JAXL/tree/master/app/echobot/">jaxl.ini</a> which setup necessary Jaxl environment for our echobot application.</p>
<p>If you are developing an application from scratch, copy sample packaged <code>jaxl.ini</code> into your project folder:
<pre name="code" class="php">cp /usr/share/php/jaxl/env/jaxl.ini /my/app/directory/jaxl.ini</pre>
<p> and update <code>JAXL_BASE_PATH</code> and <code>JAXL_APP_BASE_PATH</code> with Jaxl installation path and your application directory path respectively.</p>
<p>Before we go on to write our echobot application code logic, lets see how an XMPP application code written using Jaxl 2.0 will generally look like:</p>
<pre class="php" name="code">&lt;?php

        // Initialize Jaxl Library (#1)
        $jaxl = new JAXL();

        // Include required XEP's (#2)
        jaxl_require(array(
                'JAXL0085', // Chat State Notification
                'JAXL0092', // Software Version
                'JAXL0203'  // Delayed Delivery
        ), $jaxl);

        // Sample Echobot class (#3)
        class echobot {
                function startStream() {}
                function doAuth($mechanism) {}
                function postAuth() {}
                function getMessage($payloads) {}
                function getPresence($payloads) {}
        }
        $echobot = new echobot();

        // Add callbacks on various xmpp events (#4)
        JAXLPlugin::add('jaxl_post_connect', array($echobot, 'startStream'));
        JAXLPlugin::add('jaxl_get_auth_mech', array($echobot, 'doAuth'));
        JAXLPlugin::add('jaxl_post_auth', array($echobot, 'postAuth'));
        JAXLPlugin::add('jaxl_get_message', array($echobot, 'getMessage'));
        JAXLPlugin::add('jaxl_get_presence', array($echobot, 'getPresence'));

?&gt;</pre>
<p>Lets break down the above applications code structure (note the #1, #2, #3, #4 markers in the above code)</p>
<ul>
<li><strong>#1</strong> &#8211; Create a new Jaxl instance inside your application. By doing so Jaxl core functionality and other utilities are made available inside your application code. You can also pass parameters while initializing Jaxl instance
<pre class="php" name="code">$jaxl = new JAXL(array(
        'user'    =>    'username',
        'pass'    =>    'password',
        'host'    =>    'talk.google.com',
        'domain' =>    'gmail.com',
        'port'    =>    5222
));</pre>
<p>Passed parameters will overwrite the values specified inside <code>jaxl.ini</code> file</li>
<li><strong>#2</strong> &#8211; Include required XMPP extensions (XEP&#8217;s) inside your application code. <strong>jaxl_require</strong> is a special method which makes sure that no Jaxl core class loads twice inside a running Jaxl instance.<br/><br/>To include an implemented XEP inside your application code simply use:
<pre class="php" name="code">jaxl_require('JAXL0203', $jaxl);</pre>
<p> where 0203 is the XEP number</a> for <em><a href="http://xmpp.org/extensions/xep-0203.html">Delayed Delivery</a></em> extension, which will help our echobot know if an incoming message is an offline message. If you wish to include more than one XEP inside your application code, simply pass the list of XEP&#8217;s as an array:
<pre class="php" name="code">jaxl_require(array(
	'JAXL0085',
	'JAXL0092',
	'JAXL0203'
), $jaxl);</pre>
<p> where 0085 is xep number for <em><a href="http://xmpp.org/extensions/xep-0085.html">Chat state notification</a></em> extension and 0092 is the xep number for <em><a href="http://xmpp.org/extensions/xep-0092.html">Software Version</a></em> extension.<br/><br/>Since version 2.1.0, <code>jaxl_require</code> MANDOTORY accepts Jaxl instance which require core classes, in this case <code>$jaxl</code>. It helps Jaxl core to keep a track of required core classes for every Jaxl instances in a multiple-instance application.</li>
<li><strong>#3</strong> &#8211; Now that we have Jaxl core and required XEP&#8217;s in our application environment, it&#8217;s time to write our application code logic. Application code MUST have methods which are called back by the Jaxl core when specific xmpp events occur during your application run time. Optionally, Jaxl core can pass parameters to these methods during callbacks.</li>
<li><strong>#4</strong> &#8211; In the final step, we will register callbacks for necessary xmpp events using <code>JAXLPlugin</code> class <code>add()</code> method inside our application logic. Syntax:
<pre class="php" name="code">JAXLPlugin::add($hook, $callback);</pre>
<p> In this example, we want to receive callbacks in our application code for following available hooks and events:</p>
<ol>
<li><u>jaxl_post_connect:</u> After Jaxl has opened stream socket to the jabber server</li>
<li><u>jaxl_get_auth_mech:</u> When Jaxl have information about supported auth mechanisms by the jabber server</li>
<li><u>jaxl_post_auth:</u> After Jaxl finish authenticating the bot with the jabber server</li>
<li><u>jaxl_get_message:</u> When a new message stanza is received by Jaxl</li>
<li><u>jaxl_get_presence:</u> When a new presence stanza is received by Jaxl</li>
</ol>
</li>
</ul>
<p><strong style="font-size:18px;"><u>Writing application logic:</u></strong><br />
Till now we have the registered callbacks for various xmpp events, it&#8217;s time to catch these callbacks inside our echobot class and implement the required functionality of our application. Below is an explanation for some of the important pieces inside echobot class:</p>
<ul>
<li><em>startStream()</em> method is called when <code>jaxl_post_connect</code> event occurs. For our application we will simply send XMPP start stream by calling <code>$jaxl->startStream()</code></li>
<li><em>doAuth($mechanism)</em> method is called when <code>jaxl_get_auth_mech</code> event occurs in Jaxl core. Jaxl core passes list of supported auth mechanism by the jabber server. Proceed with a preferred auth type by calling <code>$jaxl->auth()</code> method</li>
<li><em>postAuth()</em> is called after Jaxl library has finished authenticating our application bot with the jabber server</li>
<li><em>getMessage($payloads)</em> gets all new messages as they are received by Jaxl core</li>
<li>getPresence($payloads) gets all new presence as they are received by Jaxl core</li>
</ul>
<p> <strong style="font-size:18px;"><u>Running Echobot:</u></strong><br />
Enter your application directory (<code>/usr/share/php/jaxl/echobot</code>). It MUST contain <code>jaxl.ini</code>, open and edit connecting echobot username, password and jabber host. Then from command line run echobot as follows:</p>
<pre class="php" name="code">root@ubuntu:/usr/share/pear/jaxl/app/echobot# jaxl echobot.php
== 5617 == [[2010-08-03 10:37:21]] Socket opened to the jabber host jaxl.im:5222 ...
== 5617 == [[2010-08-03 10:37:22]] Performing Auth type: DIGEST-MD5
== 5617 == [[2010-08-03 10:37:28]] Auth completed...</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fwriting-a-command-line-xmpp-bot-echobot-using-jaxl-2-0%2F","http:\/\/github.com\/abhinavsingh\/JAXL\/tree\/master\/app\/echobot\/","http:\/\/github.com\/abhinavsingh\/JAXL\/tree\/master\/app\/echobot\/","http:\/\/xmpp.org\/extensions\/xep-0203.html","http:\/\/xmpp.org\/extensions\/xep-0085.html","http:\/\/xmpp.org\/extensions\/xep-0092.html"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L3dyaXRpbmctYS1jb21tYW5kLWxpbmUteG1wcC1ib3QtZWNob2JvdC11c2luZy1qYXhsLTItMC88d3B0Yj5Xcml0aW5nIGEgY29tbWFuZCBsaW5lIFhNUFAgYm90IChlY2hvYm90KSB1c2luZyBKYXhsIDIuMDx3cHRiPmh0dHA6Ly9hYmhpbmF2c2luZ2guY29tL2Jsb2c8d3B0Yj5BYmhpJiMwMzk7cyBXZWJsb2c%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/" title="Jaxl 2.0 &#8211; Installation, Usage guide and Example apps">Jaxl 2.0 &#8211; Installation, Usage guide and Example apps</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Jaxl 2.0 &#8211; Installation, Usage guide and Example apps</title>
		<link>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 22:41:32 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[JAXL]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=673</guid>
		<description><![CDATA[
			
				
			
		
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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-installation-usage-guide-and-example-apps%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-installation-usage-guide-and-example-apps%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Documentation,Guide,JAXL" height="61" width="50" /><br />
			</a>
		</div>
<p>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 <strong>jaxl</strong> on the terminal).</p>
<p><strong style="font-size:18px;"><u>Get the source code</u></strong><br />
Jaxl 2.0 development version source code is available at <a href="http://github.com/abhinavsingh/JAXL">github</a>.</p>
<ul>
<li>For better experience download <a href="http://code.google.com/p/jaxl/downloads/list">latest stable tarball</a> from google code</li>
<li>The development version of Jaxl is <a href="http://github.com/abhinavsingh/JAXL">hosted here at Github</a>, have fun cloning the source code with Git. If you are not familar with Git just use the <strong>download</strong> button to get a tarball.
<pre class="php" name="code">root@ubuntu:~/git# git clone git://github.com/abhinavsingh/JAXL.git</pre>
</li>
</ul>
<p><strong>Warning:</strong> the development source code is only intended for people that want to develop Jaxl or absolutely need the latest features still not available on the stable releases.</p>
<p><strong style="font-size:18px;"><u>Installation on *nix Systems</u></strong><br />
Extract the downloaded tarball and enter source directory. The available <code>build.sh</code> file will help us installing Jaxl library at a preferred location on our system. Type <code>./build.sh help</code> to view help instructions:</p>
<pre class="php" name="code">root@ubuntu:~/git# cd JAXL
root@ubuntu:~/git/JAXL# ./build.sh help</pre>
<p>Build file will default install Jaxl library core under <code>/usr/share/php/jaxl</code> and Jaxl command line at <code>/usr/bin/jaxl</code>. Open build script, edit <code>PACKAGE_INSTALL_PATH</code> and <code>PACKAGE_BIN_PATH</code> to configure installation paths.</p>
<p>Issue following commands to setup Jaxl library core and Jaxl command line utility:</p>
<pre class="php" name="code">root@ubuntu:~/git/JAXL# mkdir /usr/share/php/jaxl
root@ubuntu:~/git/JAXL# ./build.sh
building...
root@ubuntu:~/git/JAXL# ./build.sh install
uninstalling old package...
installing...
root@ubuntu:~/git/JAXL# touch /var/log/jaxl.log
root@ubuntu:~/git/JAXL# chown www-data /var/log/jaxl.log
root@ubuntu:~/git/JAXL# touch /var/run/jaxl.pid
root@ubuntu:~/git/JAXL# chown www-data /var/run/jaxl.pid</pre>
<p><code>/var/log/jaxl.log</code> is default log file for Jaxl applications and <code>/var/run/jaxl.pid</code> saves the process id (pid) of running Jaxl instances.</p>
<p><strong style="font-size:18px;"><u>Usage guide</u></strong><br />
Now that we have setup Jaxl on our system, lets verify package installation by firing jaxl command line utility on the terminal:</p>
<pre class="php" name="code">root@ubuntu:~/git/JAXL# jaxl
Missing ini file...</pre>
<p>If you get <em>&#8220;Missing ini file&#8221;</em> message, you have successfully verified package installation. This message is shown when current working directory doesn&#8217;t have <code>jaxl.ini</code> file, which is required by Jaxl cli utility before it can connects to a jabber server.</p>
<p><strong style="font-size:18px;"><u>Running sample applications</u></strong><br />
Build script installs a sample application under <code>/usr/share/php/jaxl/app/echobot</code> directory. This directory contains two files namely:</p>
<ul>
<li><u>echobot.php:</u> Contains our echobot application code</li>
<li><u>jaxl.ini:</u> It is application specific Jaxl configuration file</li>
</ul>
<p>Open and update the following section inside jaxl.ini:</p>
<pre class="php" name="code">        // Connecting bot details
        define('JAXL_USER_NAME', 'username');
        define('JAXL_USER_PASS', 'password');

        // Connecting jabber server details
        define('JAXL_HOST_NAME', 'jabber.org');
        define('JAXL_HOST_PORT', 5222);
        define('JAXL_HOST_DOMAIN', 'jabber.org');</pre>
<p>Now run the echobot from using jaxl cli utility:</p>
<pre class="php" name="code">root@ubuntu:/usr/share/php/jaxl/app/echobot# jaxl echobot.php
== 2946 == [[2010-08-02 14:37:53]] Socket opened to the jabber host jabber.org:5222 ...
== 2946 == [[2010-08-02 14:37:57]] Performing Auth type: DIGEST-MD5
== 2946 == [[2010-08-02 14:38:02]] Auth completed...</pre>
<p><code>2946</code> is the process id of current running Jaxl instance. Same value can be found inside <code>/var/run/jaxl.pid</code>. Also tail the Jaxl log file for debug information:</p>
<pre class="php" name="code">root@ubuntu:~/git/JAXL# tail -f /var/log/jaxl.log
== 2946 == [[2010-08-02 14:38:02]] [[XMPPSend]] 123
<presence><show>chat</show><status>Online using Jaxl (Jabber XMPP Library in PHP)</status>
<priority>1</priority></presence></pre>
<p><code>[[XMPPSend]]</code> tells us that following XMPP packet was send by the Jaxl instance running with pid <code>2946</code>. Also, total <code>123</code> bytes were transmitted over the socket.</p>
<p>Proceed to <a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/">Writing your first command line bot using Jaxl</a> for detailed explanation of the sample echobot application or if you are interested in building real-time web applications read <a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/">Setup and Demo of Jaxl boshchat application</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Fjaxl-2-0-installation-usage-guide-and-example-apps%2F","http:\/\/github.com\/abhinavsingh\/JAXL","http:\/\/code.google.com\/p\/jaxl\/downloads\/list","http:\/\/github.com\/abhinavsingh\/JAXL"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L2pheGwtMi0wLWluc3RhbGxhdGlvbi11c2FnZS1ndWlkZS1hbmQtZXhhbXBsZS1hcHBzLzx3cHRiPkpheGwgMi4wICYjODIxMTsgSW5zdGFsbGF0aW9uLCBVc2FnZSBndWlkZSBhbmQgRXhhbXBsZSBhcHBzPHdwdGI%2BaHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZzx3cHRiPkFiaGkmIzAzOTtzIFdlYmxvZw%3D%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/" title="Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0</a> (12)</li><li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/" title="XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0">XEP 0133 &#8211; Service Administration available methods in Jaxl 2.0</a> (0)</li><li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/" title="Jaxl 2.0 Core classes, available methods and directory structure">Jaxl 2.0 Core classes, available methods and directory structure</a> (1)</li><li><a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/" title="Writing a command line XMPP bot (echobot) using Jaxl 2.0">Writing a command line XMPP bot (echobot) using Jaxl 2.0</a> (11)</li><li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/" title="How to write External Jabber Components in PHP using Jaxl library?">How to write External Jabber Components in PHP using Jaxl library?</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Releasing Jaxl 2.0 &#8211; Object oriented XMPP framework in PHP</title>
		<link>http://abhinavsingh.com/blog/2010/08/releasing-jaxl-2-0-object-oriented-xmpp-framework-in-php/</link>
		<comments>http://abhinavsingh.com/blog/2010/08/releasing-jaxl-2-0-object-oriented-xmpp-framework-in-php/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 22:41:07 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[Open Source Projects]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[JAXL]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=641</guid>
		<description><![CDATA[
			
				
			
		
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&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Freleasing-jaxl-2-0-object-oriented-xmpp-framework-in-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Freleasing-jaxl-2-0-object-oriented-xmpp-framework-in-php%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=Framework,JAXL,Open+Source,PHP,XMPP" height="61" width="50" /><br />
			</a>
		</div>
<p>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.</p>
<p><strong style="font-size:18px;"><u>What&#8217;s new in Jaxl 2.0?</u></strong></p>
<ul>
<li>A lot of structural changes has been done from the previous version to make it more scalable, robust, flexible and easy to use</li>
<li>Library now provides an event mechanism, allowing developers to register callbacks for various xmpp events in their application code</li>
<li>Use integrated BOSH support to write real time web applications in minutes</li>
<li>More than 10 new implemented XMPP extensions (XEP&#8217;s) added</li>
<li>Development hosting moves to <a href="http://github.com/abhinavsingh/JAXL">github</a>, stable releases available at <a href="http://code.google.com/p/jaxl/">google code</a></li>
</ul>
<p><strong style="font-size:18px;"><u>Documentation for Jaxl users</u></strong><br />
Below is a list of getting started documentation for XMPP app developers:</p>
<ul>
<li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-installation-usage-guide-and-example-apps">Installation, Usage guide and Sample applications</a></li>
<li><a href="http://abhinavsingh.com/blog/2010/08/jaxl-2-0-core-classes-available-methods-and-directory-structure/">Jaxl Core classes, available methods and directory structure</a></li>
<li><a href="http://abhinavsingh.com/blog/2010/08/writing-a-command-line-xmpp-bot-echobot-using-jaxl-2-0/">Writing your first command line bot using Jaxl</a></li>
<li><a href="http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/">Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl</a></li>
<li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/">Code, Setup and Demo of Bosh chat application</a></li>
<li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/">Writing External Jabber Components in PHP using Jaxl library</a></li>
<li>Writing XMPP web applications using Jaxl in 5 minutes <em>(coming soon)</em></li>
<li>Available hooks for various xmpp events <em>(coming soon)</em></li>
<li>Migration guide for Jaxl 1.x users <em>(coming soon)</em></li>
</ul>
<p><strong style="font-size:18px;"><u>Implemented XEP&#8217;s</u></strong><br />
A lot of new XEP&#8217;s has been implemented and packaged with Jaxl 2.0. Developers can use Jaxl event mechanism to implement new XEP&#8217;s without knowing the working of other core parts of the library.</p>
<p>Below is a list of released implemented XEP with Jaxl 2.0:</p>
<ul>
<li>0004 &#8211; Data Forms</li>
<li>0030 &#8211; Service Discovery</li>
<li><a href="http://abhinavsingh.com/blog/2010/08/xep-0045-%e2%80%93-multi-user-chat-muc-available-methods-in-jaxl-2-0/">0045 &#8211; Multi-User Chat</a></li>
<li>0050 &#8211; Ad-Hoc Commands</li>
<li>0085 &#8211; Chat State Notification</li>
<li>0092 &#8211; Software Version</li>
<li><a href="http://abhinavsingh.com/blog/2010/08/how-to-write-external-jabber-components-in-php-using-jaxl-library/">0114 &#8211; Jabber Component Protocol</a></li>
<li>0115 &#8211; Entity Capabilities</li>
<li>0124 &#8211; Bosh Implementation</li>
<li><a href="http://abhinavsingh.com/blog/2010/08/xep-0133-service-administration-available-methods-in-jaxl-2-0/">0133 &#8211; Service Administration</a></li>
<li>0119 &#8211; XMPP Ping</li>
<li>0202 &#8211; Entity Time</li>
<li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/">0206 &#8211; XMPP over BOSH</a></li>
<li>0249 &#8211; Direct MUC Invitation</li>
</ul>
<p><strong style="font-size:18px;"><u>Documentation for project contributors</u></strong><br />
For developers interested in contributing to the Jaxl project, here is a list of insight documentation to get you started:</p>
<ul>
<li>Jaxl core workflow and architecture <em>(coming soon)</em></li>
<li>How to implement new XMPP extensions using Jaxl <em>(coming soon)</em></li>
</ul>
<p><strong style="font-size:18px;"><u>Useful Links</u></strong><br />
For live help and discussion join <a href="xmpp:jaxl@conference.psi-im.org?join">jaxl@conference.psi-im.org</a> chat room</p>
<ul>
<li><a href="http://groups.google.com/group/jaxl">Developer Mailing List</a></li>
<li><a href="http://code.google.com/p/jaxl/issues/list?can=1&#038;q=">Issue Tracker</a></li>
<li><a href="http://www.facebook.com/imjaxlim">Facebook</a></li>
<li><a href="http://twitter.com/imjaxlim">Twitter</a></li>
</ul>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F08%2Freleasing-jaxl-2-0-object-oriented-xmpp-framework-in-php%2F","http:\/\/github.com\/abhinavsingh\/JAXL","http:\/\/code.google.com\/p\/jaxl\/","xmpp:jaxl@conference.psi-im.org?join","http:\/\/groups.google.com\/group\/jaxl","http:\/\/code.google.com\/p\/jaxl\/issues\/list?can=1&#038;q=","http:\/\/www.facebook.com\/imjaxlim","http:\/\/twitter.com\/imjaxlim"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA4L3JlbGVhc2luZy1qYXhsLTItMC1vYmplY3Qtb3JpZW50ZWQteG1wcC1mcmFtZXdvcmstaW4tcGhwLzx3cHRiPlJlbGVhc2luZyBKYXhsIDIuMCAmIzgyMTE7IE9iamVjdCBvcmllbnRlZCBYTVBQIGZyYW1ld29yayBpbiBQSFA8d3B0Yj5odHRwOi8vYWJoaW5hdnNpbmdoLmNvbS9ibG9nPHdwdGI%2BQWJoaSYjMDM5O3MgV2VibG9n";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2009/01/introducing-jaxl-open-source-jabber-xmpp-library/" title="Introducing JAXL &#8211; Open Source Jabber XMPP Library">Introducing JAXL &#8211; Open Source Jabber XMPP Library</a> (81)</li><li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/" title="PHP Code, Setup and Demo of Jaxl boshchat application">PHP Code, Setup and Demo of Jaxl boshchat application</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-real-time-system-server-load-notification-on-any-im-using-php-and-xmpp/" title="Get real time system &amp; server load notification on any IM using PHP and XMPP">Get real time system &amp; server load notification on any IM using PHP and XMPP</a> (17)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-lyrics-for-any-song-using-xmpp-and-php-right-into-your-im-add-lyricsflygtalkbots-com/" title="Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com">Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com</a> (15)</li><li><a href="http://abhinavsingh.com/blog/2009/09/5-exciting-gaming-bots-you-can-create-using-jaxl-jabber-xmpp-library-in-php/" title="5 exciting (gaming) bots you can create using Jaxl (Jabber XMPP Library) in PHP">5 exciting (gaming) bots you can create using Jaxl (Jabber XMPP Library) in PHP</a> (15)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/08/releasing-jaxl-2-0-object-oriented-xmpp-framework-in-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Introducing WP-Chat :: XMPP Chat plugin for Wordpress</title>
		<link>http://abhinavsingh.com/blog/2010/07/introducing-wp-chat-xmpp-chat-plugin-for-wordpress/</link>
		<comments>http://abhinavsingh.com/blog/2010/07/introducing-wp-chat-xmpp-chat-plugin-for-wordpress/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 21:25:05 +0000</pubDate>
		<dc:creator>Abhinav Singh</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[JAXL]]></category>
		<category><![CDATA[MemChat]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=617</guid>
		<description><![CDATA[
			
				
			
		
WP-Chat plugin embeds Jaxl IM (Instant Messenger for the web) for wordpress blogs. It runs across all major browsers and built upon XMPP protocol. It is a hosted solution from Jaxl.im empowering real time communication between you and your site visitors. It expects no software or hardware pre-requisites from your site servers or users. Above [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F07%2Fintroducing-wp-chat-xmpp-chat-plugin-for-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F07%2Fintroducing-wp-chat-xmpp-chat-plugin-for-wordpress%2F&amp;source=imoracle&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f027b5a79a20a49b713f16282f1e0857&amp;hashtags=JAXL,MemChat,WordPress,XMPP" height="61" width="50" /><br />
			</a>
		</div>
<p>WP-Chat plugin embeds Jaxl IM (Instant Messenger for the web) for wordpress blogs. It runs across all major browsers and built upon XMPP protocol. It is a hosted solution from <a href="http://jaxl.im">Jaxl.im</a> empowering real time communication between you and your site visitors. It expects no software or hardware pre-requisites from your site servers or users. Above all it&#8217;s free!</p>
<p><strong style="font-size:18px;"><u>Overview:</u></strong></p>
<ul>
<li>Supports for all major browser including Firefox, Chrome, Safari and IE</li>
<li>Embeddable on all blogs, forums, personal, social and enterprise sites</li>
<li>Built using XMPP protocol (backbone for facebook and google chats)</li>
<li>Hosted dashboard for site admins and IM users</li>
<li>Pluggable and Skinnable using developer api</li>
<li>Connect with you desktop IM clients (e.g. Pidgin, PSI, &#8230;)</li>
</ul>
<p><strong style="font-size:18px;"><u>History:</u></strong><br />
In two of my previous post (<a href="http://abhinavsingh.com/blog/2009/11/introducing-memchat-open-source-group-chat-framework-in-php-supporting-memcached-apc-sqlite-flat-files-and-mysql/">Introducing MemChat</a> and <a href="http://abhinavsingh.com/blog/2010/01/jaxl-bosh-demo-im-chat-client-for-all-wordpress-blogs/">Jaxl BOSH Demo</a>), I discussed and demoed a very early version of WP Chat plugin. In past 3 months, work has been done to make WP Chat generic enough so that it can be embedded across all kind of blogs, forums, social, personal and enterprise level websites. As of today, the product is named as &#8220;<a href="http://im.jaxl.im/">Jaxl IM (Instant Messenger for the web)</a>&#8221; and made available as &#8220;<a href="http://wordpress.org/extend/plugins/wp-chat">WP-Chat</a>&#8221; for the wordpress users.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/api.tweetmeme.com\/share?url=http%3A%2F%2Fabhinavsingh.com%2Fblog%2F2010%2F07%2Fintroducing-wp-chat-xmpp-chat-plugin-for-wordpress%2F","http:\/\/jaxl.im","http:\/\/im.jaxl.im\/","http:\/\/wordpress.org\/extend\/plugins\/wp-chat"];var wordpress_toolbar_url = "http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "oinw";var wordpress_toolbar_hash = "aHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZy8yMDEwLzA3L2ludHJvZHVjaW5nLXdwLWNoYXQteG1wcC1jaGF0LXBsdWdpbi1mb3Itd29yZHByZXNzLzx3cHRiPkludHJvZHVjaW5nIFdQLUNoYXQgOjogWE1QUCBDaGF0IHBsdWdpbiBmb3IgV29yZHByZXNzPHdwdGI%2BaHR0cDovL2FiaGluYXZzaW5naC5jb20vYmxvZzx3cHRiPkFiaGkmIzAzOTtzIFdlYmxvZw%3D%3D";</script><!-- Jaxl IM embed starts -->
<script type="text/javascript">
(function() {
var jaxlChat = document.createElement("script");
jaxlChat.type = "text/javascript";
jaxlChat.async = true;
jaxlChat.src = "http://im.jaxl.im/ui/jaxl.js";
(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(jaxlChat);
})();
</script>
<!-- Jaxl IM embed ends --><ul class="related_post"><li><a href="http://abhinavsingh.com/blog/2010/08/php-code-setup-and-demo-of-jaxl-boshchat-application/" title="PHP Code, Setup and Demo of Jaxl boshchat application">PHP Code, Setup and Demo of Jaxl boshchat application</a> (10)</li><li><a href="http://abhinavsingh.com/blog/2010/08/releasing-jaxl-2-0-object-oriented-xmpp-framework-in-php/" title="Releasing Jaxl 2.0 &#8211; Object oriented XMPP framework in PHP">Releasing Jaxl 2.0 &#8211; Object oriented XMPP framework in PHP</a> (6)</li><li><a href="http://abhinavsingh.com/blog/2010/01/jaxl-bosh-demo-im-chat-client-for-all-wordpress-blogs/" title="JAXL BOSH Demo: IM chat client for all Wordpress blogs">JAXL BOSH Demo: IM chat client for all Wordpress blogs</a> (30)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-real-time-system-server-load-notification-on-any-im-using-php-and-xmpp/" title="Get real time system &amp; server load notification on any IM using PHP and XMPP">Get real time system &amp; server load notification on any IM using PHP and XMPP</a> (17)</li><li><a href="http://abhinavsingh.com/blog/2010/01/get-lyrics-for-any-song-using-xmpp-and-php-right-into-your-im-add-lyricsflygtalkbots-com/" title="Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com">Get lyrics for any song using XMPP and PHP right into your IM &#8211; Add lyricsfly@gtalkbots.com</a> (15)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2010/07/introducing-wp-chat-xmpp-chat-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>
