tyrola/xmpphp
最新稳定版本:v2.2
Composer 安装命令:
composer require tyrola/xmpphp
包简介
Jabber Library For Sending Jabber Messages
README 文档
README
XMPPHP is a fork of svn://netflint.net/xmpphp. This is an elegant PHP library for XMPP (aka Jabber, Google Talk, etc).
Author: Nathan Fritz, jabber id: fritzy [at] netflint.net Co-Author: Stephan Wentz, jabber id: stephan [at] wentz.it Maintainer of this fork: Alexander Birkner
Prerequisites
- PHP 5.3.2 or newer
- SSL Support Compiled
Installation
Installation is a quick and easy 2 steps process:
- Install XMPPHP
- Use it
Step 1: Install XMPPHP
The preferred way to install this bundle is to rely on Composer.
Just check on Packagist the version you want to install (in the following example, we used "2.0-dev") and add it to your composer.json:
{ "require": { // ... "tyrola/xmpphp": "2.0-dev" } }
Step 2: Use it
This sample shows how to send a Jabber message to a user.
<?php require_once './vendor/autoload.php'; $XMPP = new \BirknerAlex\XMPPHP\XMPP('jabber.domain.com', 5222, 'firstname.lastname', 'MySecretPassword', 'PHP'); $XMPP->connect(); $XMPP->processUntil('session_start', 10); $XMPP->presence(); $XMPP->message('target.user@jabber.domain.com', 'Hello, how are you?', 'chat'); $XMPP->disconnect();
Please feel free to add more samples to this Github Repository.
TODO
- MUC Support
License Exception
Please contact Nathan Fritz for library exceptions if you would like to distribute XMPPHP with a non-GPL compatible license.
统计信息
- 总下载量: 41.84k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2013-10-28