From 9793c80e60da2ee9f6f1c2aad76c7fe6b2e32b45 Mon Sep 17 00:00:00 2001 From: fritzy Date: Tue, 3 Jun 2008 21:00:38 +0000 Subject: [PATCH] * added auto subscribe to cli example git-svn-id: svn://netflint.net/xmpphp@44 ef36c318-a008-4979-b6e8-6b496270793b --- cli_longrun_example.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli_longrun_example.php b/cli_longrun_example.php index f9381f8..e677d2e 100644 --- a/cli_longrun_example.php +++ b/cli_longrun_example.php @@ -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()); -} \ No newline at end of file +}