php include XMPPHP XMPP php conn new XMPPHP_XMPP jabber ru 5222 name p

 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, 'name', 'pass', 'xmpphp');
try
{
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('anynet@jabber.ru', 'TEST CONNECT');
$conn->disconnect();
}
catch(XMPPHP_Exception $e)
{
die($e->getMessage());
}
?>