This project mainly used to monitor my shell script in my linux computer.you can write a daemon thread to send message to your gtalk,so you can konw the status for the script.
Requirements ¶
Yii 1.1.10+
Usage ¶
[STEP1] Download the extensions and extract the file to the extensions path.
[STEP2] FIND THE config/main.php and add the code
'components'=>array(
...........
'gtalk'=>array(
'class'=>'ext.XMPPHP.Xmpp',
'host'=>'talk.google.com',
'port'=>5222,
'user'=>'your gtalk username',
'password'=>'your gtalk password',
'resource'=>'xmpphp',
'server'=>'gmail.com',
'printlog'=>false,
'loglevel'=>null),
.......
)
[STEP3] in your any action you can use as :
$talk = Yii::app()->gtalk;
try {
$talk->connect();
$talk->processUntil('session_start');
//$talk->presence();
$talk->message('your friends in your gtalk ', 'message you want to send');
$talk->disconnect();
} catch(XMPPHP_Exception $e) {
die($e->getMessage());
}
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.