* added comments to examples

git-svn-id: svn://netflint.net/xmpphp@49 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
fritzy 2008-07-16 23:07:01 +00:00
parent 513a274ea8
commit 4b303e29d7
2 changed files with 7 additions and 3 deletions

View File

@ -1,10 +1,12 @@
<?php <?php
// activate full error reporting // activate full error reporting
error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/XMPP.php'; include 'XMPPHP/XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$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(); $conn->autoSubscribe();

View File

@ -1,10 +1,12 @@
<?php <?php
// activate full error reporting // activate full error reporting
error_reporting(E_ALL & E_STRICT); //error_reporting(E_ALL & E_STRICT);
include 'XMPPHP/XMPP.php'; include 'XMPPHP/XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO); $conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
try { try {
@ -15,4 +17,4 @@ try {
$conn->disconnect(); $conn->disconnect();
} catch(XMPPHP_Exception $e) { } catch(XMPPHP_Exception $e) {
die($e->getMessage()); die($e->getMessage());
} }