'jabber.domain.com', 'port' => 5222, 'username' => 'username', 'password' => 'password', 'proto' => 'xmpphp', 'domain' => 'domain.net', 'printlog' => true, 'loglevel' => XMPPHP\Log::LEVEL_VERBOSE, ]; // Easy and simple for access to variables with their names extract($conf); $XMPP = new XMPPHP\XMPP($server, $port, $username, $password, $proto, $domain, $printlog, $loglevel); try { $XMPP->connect(); $XMPP->processUntil('session_start', 10); $XMPP->presence(); $XMPP->message('target.user@jabber.domain.com', 'Hello, how are you?', 'chat'); $XMPP->disconnect(); } catch (XMPPHP\Exception $e) { die($e->getMessage()); }