A
A
astrotrain2016-02-16 13:09:17
PHP
astrotrain, 2016-02-16 13:09:17

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());
}

Writes an error " error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed " and hangs. In general, there are only misunderstandings with xmpphp. Is there an alternative with examples and docs? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LBC, 2016-02-16
@astrotrain

We use this for 3-4 months - there were no problems:
https://github.com/fabiang/xmpp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question