Current time: 04-20-2024, 09:29 AM Hello There, Guest! (LoginRegister)


Post Reply 
Configurable Notification via jabber
Author Message
ericliang Offline


Posts: 3
Joined: Aug 2009
Reputation: 0
Post: #7
RE: Configurable Notification via jabber
Best (IMO) is to use this PHP class:

http://code.google.com/p/xmpphp

and add something like

require_once('XMPPHP/Log.php');
require_once('XMPPHP/XMPP.php');

$conn = new XMPPHP_XMPP('xmpp.DOMAIN.TLD', 5222, 'USERNAME', 'PASSWORD', 'xmpphp', 'DOMAIN.TLD', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);

try {
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('receiver@DOMAIN.TLD', "message that SHOULD BE in UTF-8" );
$conn->disconnect();
} catch(XMPPHP_Exception $e) {
echo $e->getMessage();
}

Also I assume that it would be best to have XMPP notification only for the important messages like failed attempts or server down? Don't know if this is possible, still very new with ispCP here...

But this is extremely easy to implement in native PHP (I think PHP5 is the default in ispCP, right?) and can be added in 10 minutes I think.

Eric
(This post was last modified: 09-04-2009 06:38 PM by ericliang.)
09-04-2009 06:36 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Configurable Notification via jabber - ericliang - 09-04-2009 06:36 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)