How to connect xmpp in php?

1.7k views Asked by At

i am trying to connect server using xmppphp but is not connect is display nothing

include 'XMPPHP/XMPP.php';

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

try {
    $conn->connect();
    $conn->processUntil('session_start');
    $conn->presence();
    $conn->message('[email protected]', 'This is a test message!');
    $conn->disconnect();
} catch(XMPPHP_Exception $e) {
    die($e->getMessage());
}
1

There are 1 answers

0
Bruno Pitteli Gonçalves On

Have you tried to use TLS and use por 5223

Where you got this lib?