How to connect xmpp in php?

I try to connect to the server using xmppphp but it doesn’t connect, nothing is displayed

include 'XMPPHP/XMPP.php';

$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'test@gmail.com', 'test123', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);

try {
    $conn->connect();
    $conn->processUntil('session_start');
    $conn->presence();
    $conn->message('123@gmail.com', 'This is a test message!');
    $conn->disconnect();
} catch(XMPPHP_Exception $e) {
    die($e->getMessage());
}
+4
source share
1 answer

You tried to use TLS and use por 5223

Where did you get this lib?

0
source

All Articles