added proper phpdoc, added exceptions, added useEncryption() method
git-svn-id: svn://netflint.net/xmpphp@34 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
@@ -3,11 +3,16 @@
|
||||
// activate full error reporting
|
||||
error_reporting(E_ALL & E_STRICT);
|
||||
|
||||
include("XMPPHP/XMPP.php");
|
||||
include 'XMPPHP/XMPP.php';
|
||||
|
||||
$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
|
||||
$conn->connect();
|
||||
$conn->processUntil('session_start');
|
||||
$conn->presence();
|
||||
$conn->message('stephan@jabber.wentz.it', 'This is a test message!');
|
||||
$conn->disconnect();
|
||||
|
||||
try {
|
||||
$conn->connect();
|
||||
$conn->processUntil('session_start');
|
||||
$conn->presence();
|
||||
$conn->message('stephan@jabber.wentz.it', 'This is a test message!');
|
||||
$conn->disconnect();
|
||||
} catch(XMPPHP_Exception $e) {
|
||||
die($e->getMessage());
|
||||
}
|
Reference in New Issue
Block a user