Answer the question
In order to leave comments, you need to log in
Is there a good PHP library for receiving and sending xmpp messages?
I tried xmpphp, but there is no documentation, it's not clear what and how it works. For example:
<?php
require_once("XMPPHP/XMPP.php");
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$conn = new XMPPHP_XMPP('server', 5222, 'user', 'pass', 'xmpphp', '', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_INFO);
//$conn->useEncryption(false);
try {
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('[email protected]', 'hi there');
$conn->disconnect();
} catch(XMPPHP_Exception $e) {
die($e->getMessage());
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question