PHPackages                             wufeng/tim - 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. wufeng/tim

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

wufeng/tim
==========

腾讯即时通信封装

0156PHP

Since Aug 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/huangxifang/wufeng-tim)[ Packagist](https://packagist.org/packages/wufeng/tim)[ RSS](/packages/wufeng-tim/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

腾讯云即时通信IM 接口
============

[](#腾讯云即时通信im-接口)

php 简单封装 腾讯即时通讯IM 服务端，便于自己方便使用

IM版本：v4

composer安装
----------

[](#composer安装)

```
composer require wufeng\tim
```

使用说明
----

[](#使用说明)

1.初始化

```
$config=[
    'appid'=> '', //必须，腾讯即时通讯获得
    'key'=> '',  //必须，腾讯即时通讯获得
    'userid'=> '',  //必须，用户名或ID，一般应用管理员
];
$tim = new \wufeng\tim\Tim($config);
```

2.获取UserSig

```
/**
* 获取UserSig
*/
$sign = $tim->getSign();
```

临时手动切换账号与UserSig

```
// $sign 为已获得的UserSig
$tim->setConfig($userid,$sign);
```

3.请求命令

```
$result = $tim->query('im_open_login_svc','account_import',[
    'Identifier'=>'test',
    'Nick'=>'test',
    'FaceUrl'=>'http://www.qq.com'
]);
print_r($result);
```

结果应答

```
//结果示例
[
   "ActionStatus"=>"OK",
   "ErrorInfo"=>"",
   "ErrorCode"=>0
]
```

> 具体业务逻辑与返回数据以官方文档为准 更多使用方法参考官方文档

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15809145?v=4)[huangxifang](/maintainers/huangxifang)[@huangxifang](https://github.com/huangxifang)

---

Top Contributors

[![huangxifang](https://avatars.githubusercontent.com/u/15809145?v=4)](https://github.com/huangxifang "huangxifang (8 commits)")

### Embed Badge

![Health badge](/badges/wufeng-tim/health.svg)

```
[![Health](https://phpackages.com/badges/wufeng-tim/health.svg)](https://phpackages.com/packages/wufeng-tim)
```

###  Alternatives

[roundcube/plugin-installer

A composer-installer for Roundcube plugins and skins.

34434.8k223](/packages/roundcube-plugin-installer)[am-impact/amforms

Forms plugin for Craft

1202.6k](/packages/am-impact-amforms)[think.studio/laravel-recently-viewed

Package to make quickly recently viewed functionality

116.0k](/packages/thinkstudio-laravel-recently-viewed)

PHPackages © 2026

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