2008-04-02 08:09:28 +01:00
|
|
|
<?php
|
2008-04-28 23:05:31 +01:00
|
|
|
|
|
|
|
// activate full error reporting
|
|
|
|
error_reporting(E_ALL & E_STRICT);
|
|
|
|
|
2008-05-05 20:50:02 +01:00
|
|
|
include 'XMPPHP/XMPP.php';
|
2008-05-01 15:29:33 +01:00
|
|
|
|
2008-05-05 19:35:48 +01:00
|
|
|
$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
|
2008-05-05 20:50:02 +01:00
|
|
|
|
|
|
|
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());
|
|
|
|
}
|