2017 © Pedro Peláez
 

library xmpp-prebind-php

This class is for prebinding a XMPP Session with PHP.

image

anshusah/xmpp-prebind-php

This class is for prebinding a XMPP Session with PHP.

  • Thursday, November 2, 2017
  • by anshusah
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 47 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

XMPP Prebind for PHP

This class is for prebinding a XMPP Session with PHP., (*1)

Usage

  • Clone the repo
  • In your file where you want to do the prebinding:
/**
 * Comment here for explanation of the options.
 *
 * Create a new XMPP Object with the required params
 *
 * @param string $jabberHost Jabber Server Host
 * @param string $boshUri    Full URI to the http-bind
 * @param string $resource   Resource identifier
 * @param bool   $useSsl     Use SSL (not working yet, TODO)
 * @param bool   $debug      Enable debug
 */
$xmppPrebind = new XmppPrebind('your-jabber-host.tld', 'http://your-jabber-host/http-bind/', 'Your XMPP Clients resource name', false, false);
$xmppPrebind->connect($username, $password);
$xmppPrebind->auth();
$sessionInfo = $xmppPrebind->getSessionInfo(); // array containing sid, rid and jid
  • If you use Candy, change the Candy.Core.Connect() line to the following:
Candy.Core.attach('<?php echo $sessionInfo['jid'] ?>', '<?php echo $sessionInfo['sid'] ?>', '<?php echo $sessionInfo['rid'] ?>');
  • You should now have a working prebinding with PHP

Debugging

If something doesn't work, you can enable Debug. Debug output is logged to FirePHP, so you have to install that first., (*2)

Other Languages

There exist other projects for other languages to support a prebind. Go googling :), (*3)

Be aware

This class is in no way feature complete. There may also be bugs. I'd appreciate it if you contribute or submit bug reports., (*4)

Thanks., (*5)

The Versions

02/11 2017

dev-master

9999999-dev http://jolicode.com

This class is for prebinding a XMPP Session with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • lib-libxml *

 

by piotr
by Michael Weibel
by Alex Knol

php xmpp prebind

26/02 2015

dev-composer_update

dev-composer_update http://jolicode.com

This class is for prebinding a XMPP Session with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • lib-libxml *

 

by piotr
by Michael Weibel
by Alex Knol

php xmpp prebind