28 lines
734 B
PHP
28 lines
734 B
PHP
|
<?php
|
||
|
require('class.jabber.php');
|
||
|
|
||
|
sendviajabber("coucou! \n ca va");
|
||
|
function sendviajabber($message)
|
||
|
{
|
||
|
$JABBER = new Jabber;
|
||
|
|
||
|
$JABBER->server = 'tourmentine.com';
|
||
|
$JABBER->port = 5222;
|
||
|
$JABBER->username = 'alerts';
|
||
|
$JABBER->password = 'gbzm@alerts';
|
||
|
$JABBER->resource = 'ClassJabberPHP';
|
||
|
|
||
|
$JABBER->Connect() or die('Could not connect!');
|
||
|
$JABBER->SendAuth() or die('Could not authenticate!');
|
||
|
|
||
|
$JABBER->SendPresence(NULL,NULL,'online');
|
||
|
|
||
|
// $JABBER->SendMessage('xxx@jabber.de.cw.net', 'chat', NULL, array( 'body' => 'Call from '.$agi['callerid'].' on '.$agi['dnid'] ));
|
||
|
$JABBER->SendMessage('n@tourmentine.com', 'chat', NULL, array( 'body' => $message ));
|
||
|
|
||
|
$JABBER->Disconnect();
|
||
|
fclose($in);
|
||
|
fclose($err);
|
||
|
}
|
||
|
?>
|