* added auto subscribe to cli example
git-svn-id: svn://netflint.net/xmpphp@44 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
parent
4208a1a439
commit
9793c80e60
@ -6,6 +6,7 @@ error_reporting(E_ALL & E_STRICT);
|
||||
include 'XMPPHP/XMPP.php';
|
||||
|
||||
$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_INFO);
|
||||
$conn->autoSubscribe();
|
||||
|
||||
try {
|
||||
$conn->connect();
|
||||
@ -29,6 +30,7 @@ try {
|
||||
break;
|
||||
case 'session_start':
|
||||
print "Session Start\n";
|
||||
$conn->getRoster();
|
||||
$conn->presence($status="Cheese!");
|
||||
break;
|
||||
}
|
||||
@ -36,4 +38,4 @@ try {
|
||||
}
|
||||
} catch(XMPPHP_Exception $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user