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.
Yii 1.1.10+
[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()); }
Be the first person to leave a comment
Please login to leave your comment.