* 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';
|
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 = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_INFO);
|
||||||
|
$conn->autoSubscribe();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn->connect();
|
$conn->connect();
|
||||||
@ -29,6 +30,7 @@ try {
|
|||||||
break;
|
break;
|
||||||
case 'session_start':
|
case 'session_start':
|
||||||
print "Session Start\n";
|
print "Session Start\n";
|
||||||
|
$conn->getRoster();
|
||||||
$conn->presence($status="Cheese!");
|
$conn->presence($status="Cheese!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user