php include XMPPHP XMPP php conn new XMPPHP_XMPP jabber ru 5222 richwe

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
include ('XMPPHP/XMPP.php');
$conn = new XMPPHP_XMPP('jabber.ru', 5222, 'richweber@jabber.ru', 'password', 'xmpphp', 'jabber.ru', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
try
{
$conn->useEncryption(false);
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('richweber@jabber.ru', 'TEST CONNECT');
$conn->disconnect();
}
catch(XMPPHP_Exception $e)
{
die($e->getMessage());
}
?>