PHPackages                             chenyongze/yunxin-util - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chenyongze/yunxin-util

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chenyongze/yunxin-util
======================

 网易云信 IM SDK fro PHP , IM ,聊天室，直播间

1.0.3(5y ago)014MITPHPPHP ^7.0.0

Since Apr 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/chenyongze/yunxin-util)[ Packagist](https://packagist.org/packages/chenyongze/yunxin-util)[ RSS](/packages/chenyongze-yunxin-util/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

[![https://yunxin.163.com/res/image/base/logo/logo-black@2x.png?v=5](https://camo.githubusercontent.com/97faf07ddef72bd8d93656e24dfbb10417590870aff703625346ef4f5b3199ac/68747470733a2f2f79756e78696e2e3136332e636f6d2f7265732f696d6167652f626173652f6c6f676f2f6c6f676f2d626c61636b4032782e706e673f763d35)](https://camo.githubusercontent.com/97faf07ddef72bd8d93656e24dfbb10417590870aff703625346ef4f5b3199ac/68747470733a2f2f79756e78696e2e3136332e636f6d2f7265732f696d6167652f626173652f6c6f676f2f6c6f676f2d626c61636b4032782e706e673f763d35)

[![PHP from Packagist](https://camo.githubusercontent.com/f6c3d889d7429846350aacdcf2d1fe0bf957b20b599e02b0bd9991790e2dd95b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667)](https://camo.githubusercontent.com/f6c3d889d7429846350aacdcf2d1fe0bf957b20b599e02b0bd9991790e2dd95b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667) [![](https://camo.githubusercontent.com/d6c8f3e7420d57d14f495eb75dbaf059d89e5275009774c60d138621d35c398f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667)](https://camo.githubusercontent.com/d6c8f3e7420d57d14f495eb75dbaf059d89e5275009774c60d138621d35c398f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667) [![](https://camo.githubusercontent.com/0c7f87c20bfe4d5f66aabbf0298f279eb5794b58e1ccf41bf90423d9801f0027/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667)](https://camo.githubusercontent.com/0c7f87c20bfe4d5f66aabbf0298f279eb5794b58e1ccf41bf90423d9801f0027/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667) [![Packagist](https://camo.githubusercontent.com/fa2ae7dfee54257843b0eddbba7f3394f5b1df768c4a5ab1173a84ad280448c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667)](https://camo.githubusercontent.com/fa2ae7dfee54257843b0eddbba7f3394f5b1df768c4a5ab1173a84ad280448c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e697a6572696e2f79756e2d78696e2d68656c7065722e737667)

安装
==

[](#安装)

推荐使用 Composer：`composer require chenyongze/yunxin-util ^1.0`

使用
==

[](#使用)

### 创建实例

[](#创建实例)

```
$appKey = '****'; // 网易云信分配的账号
$appSecrt = '****'; // 网易云信分配的密钥
$entrance = new \YunxinUtil\Entrance($appKey, $appSecrt);
```

### 用户

[](#用户)

```
# 创建用户
$entrance->user()->create($accid, $name, $icon);

# 用户基本信息更新
$entrance->user()->update($accid, $token);

# 封禁用户
$entrance->user()->block($accid);

# 解禁用户
$entrance->user()->unblock($accid);

# 更新用户名片
$entrance->user()->updateUserInfo($accid, $name, $icon);

# 批量获取用户名片
$entrance->user()->getUserInfos($accids);
```

### 消息功能

[](#消息功能)

```
# 文本消息
$entrance->chat()->sendTextMsg($accidFrom, $to, $open, $text);

# 图片消息
$entrance->chat()->sendPictureMsg($accidFrom, $to, $open,$picName, $picMD5, $picUrl, $picExt, $picWidth, $picHeight, $picSize);

# 批量文本消息
$entrance->chat()->sendTextBatchMsg($accidFrom, $accidsTo, $text);

# 发送自定义系统通知
$entrance->chat()->sendAttachMsg($from, CHAT::CHAT_ONT_TO_ONE, $to, $attach);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Total

4

Last Release

2147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe9551b1d68eb930b67530c12424e256c85d5eb45ad5899e40b2fc625f5e95b7?d=identicon)[chenyongze](/maintainers/chenyongze)

---

Top Contributors

[![chenyongze](https://avatars.githubusercontent.com/u/4531363?v=4)](https://github.com/chenyongze "chenyongze (6 commits)")

### Embed Badge

![Health badge](/badges/chenyongze-yunxin-util/health.svg)

```
[![Health](https://phpackages.com/badges/chenyongze-yunxin-util/health.svg)](https://phpackages.com/packages/chenyongze-yunxin-util)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
