Yii 1.1: xmpphp-gtalk

XMPPHP to connect to gtalk ,you can send message to your frendlist in your gtalk,also you can monitor server.
8 followers

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());
    }

xmpphp project in google xmpphp-gtalk for yii in github

my blog

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads