PHPackages                             code-lives/im - 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. code-lives/im

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

code-lives/im
=============

腾讯Im 加入聊天池 系统发送自定义消息 加入群组 创建群组 获取群成员列表 检测用户是否在加入Im 更改未读状态 拉取聊天记录 设置个人资料

3.0(4y ago)48322MITPHP

Since Jun 24Pushed 4y ago2 watchersCompare

[ Source](https://github.com/code-lives/im)[ Packagist](https://packagist.org/packages/code-lives/im)[ RSS](/packages/code-lives-im/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Im（点个收藏是我前进的动力）
===============

[](#im点个收藏是我前进的动力)

腾讯Im 加入聊天池 系统发送自定义消息 加入群组 创建群组 获取群成员列表 检测用户是否在加入Im 更改未读状态 拉取聊天记录 设置个人资料

设置参数
----

[](#设置参数)

```
im_id      Im 申请的id

im_key     Im 申请的key

admin_id   Im 管理员账号【选填】用于发送一些消息。比如 A和B在聊天  拿着A账号给B发送一条消息 或者 创建群组 查询群组等
```

生成 UserSig
----------

[](#生成-usersig)

```
$Im = new Im\api\Im($im_id,$im_key);

$Im->genUserSig($uid);
```

把用户uid 导入到Im的聊天配置中【相当于加入该项目的群】
------------------------------

[](#把用户uid-导入到im的聊天配置中相当于加入该项目的群)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->account_import($uid,$nickname,$images); //用户的uid 姓名 头像

返回类型 true  false
```

设置个人资料
------

[](#设置个人资料)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->set_info($uid,$data); //用户的uid 用户字段配置

返回类型 true  false
```

检测用户是否在加入Im
-----------

[](#检测用户是否在加入im)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->check_bind($uid); //用户uid

返回类型 true  false
```

管理员发送自定义消息\[new 的必须带 \_admin\_id\]
----------------------------------

[](#管理员发送自定义消息new-的必须带-_admin_id)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->from_to($from_id,$to_id,$content);  //发送人id 接收人id 内容自定义的数组或字符串

返回类型 true  false
```

设置用户的某个单聊会话的消息全部已读\[new 的必须带 \_admin\_id\]
------------------------------------------

[](#设置用户的某个单聊会话的消息全部已读new-的必须带-_admin_id)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->msg_read($from_id,$to_id);  //发送人id 接收人id 内容自定义的数组或字符串

返回类型 true  false
```

查询群组里面有多少人
----------

[](#查询群组里面有多少人)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->get_work_list($work_name,$offset,$limit);  //群名称  offset 类似于分页 limit 每页几条

返回类型 array()  false
```

加入群聊
----

[](#加入群聊)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->add_work($work_name,$uid);  //群名称  用户uid

返回类型 true  false
```

创建群聊
----

[](#创建群聊)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->create_work($create_id，$group_name);  //创建人id  群名称

返回类型 群id  false
```

消息已读
----

[](#消息已读)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->msg_read($from_id，$to_id);  //fromy_id 操作用户  to_id 被读用户

返回类型 群id  false
```

拉取聊天记录
------

[](#拉取聊天记录)

```
$Im = new Im\api\Im($im_id,$im_key,$admin_id);

$Im->get_history($parm);  //$parm['ChatType']消息类型 $parm['MsgTime'] 时间戳 2021010221=2021年10月1日21时-21时59分记录

返回类型 群id  false
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

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 ~82 days

Total

3

Last Release

1659d ago

Major Versions

1.0 → 2.02021-07-28

2.0 → 3.02021-12-07

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79346591?v=4)[LiJie](/maintainers/code-lives)[@code-lives](https://github.com/code-lives)

---

Top Contributors

[![code-lives](https://avatars.githubusercontent.com/u/79346591?v=4)](https://github.com/code-lives "code-lives (35 commits)")

### Embed Badge

![Health badge](/badges/code-lives-im/health.svg)

```
[![Health](https://phpackages.com/badges/code-lives-im/health.svg)](https://phpackages.com/packages/code-lives-im)
```

###  Alternatives

[vufind-org/vufindharvest

VuFind Harvest Tools

23302.8k3](/packages/vufind-org-vufindharvest)[wallacemartinss/filament-icon-picker

A beautiful icon picker component for Filament v5 using blade-ui-kit/blade-icons

4716.9k29](/packages/wallacemartinss-filament-icon-picker)[eminos/statamic-tabs

A Statamic addon to be able to group fields into tabs.

1567.9k](/packages/eminos-statamic-tabs)

PHPackages © 2026

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