PHPackages                             tianrang/ibok - 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. tianrang/ibok

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

tianrang/ibok
=============

a simple webchat and broadcast live built with PHP-Swoole

041PHP

Since Aug 4Pushed 8y agoCompare

[ Source](https://github.com/stone-ice/ibok)[ Packagist](https://packagist.org/packages/tianrang/ibok)[ RSS](/packages/tianrang-ibok/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ibok
====

[](#ibok)

php+swoole，简单的聊天室，直播

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

[](#install-composer-安装)

`composer require tianrang/ibok:dev-master`

usage 使用
--------

[](#usage-使用)

- 自动加载 `require './vendor/autoload.php'`
- 配置参数，并实例化 `tianrang\ibok\Start` 类，具体配置参考`src/config.php`
- cli模式运行服务端脚本
- 在浏览器访问客户端脚本

example 例子：
-----------

[](#example-例子)

- composer.json 同级目录下，创建文件 do.php

```
## composer 自动加载
require './vendor/autoload.php';

## 项目初始化配置
$config = [
	'host' => '192.168.10.20'
	];

## 初始化项目实例
$bootstrap = tianrang\ibok\Start::init($config);

## 判断脚本运行模式
$type = $_GET['type'] ?? 'server';

## cli模式运行服务端脚本
if ($type === 'server') {
	preg_match("/cli/i", php_sapi_name()) === 0 && die('必须用CLI模式运行！');
	$bootstrap->serverRun();
}

## fcgi模式运行客户端脚本
if ($type === 'client') {
	$bootstrap->clientRun();
}
```

- linux 上运行 `do.php`[![聊天服务器](https://camo.githubusercontent.com/634d1471ec73328c48f4f14f8cc3ef2ead489acf23593f603156123473d9a97c/68747470733a2f2f7374617469632e697368617070792e636e2f696d616765732f7365727665722e776562636861742e706e67)](https://camo.githubusercontent.com/634d1471ec73328c48f4f14f8cc3ef2ead489acf23593f603156123473d9a97c/68747470733a2f2f7374617469632e697368617070792e636e2f696d616765732f7365727665722e776562636861742e706e67)
- 浏览器访问 `http://XXX.com/do.php?type=client`[![聊天客户端](https://camo.githubusercontent.com/dafa2ce8c53fe40ea57a6ec94b16550357c235d6fb55bd2cc64a2d7ba0fa1e90/68747470733a2f2f7374617469632e697368617070792e636e2f696d616765732f636c69656e742e776562636861742e706e67)](https://camo.githubusercontent.com/dafa2ce8c53fe40ea57a6ec94b16550357c235d6fb55bd2cc64a2d7ba0fa1e90/68747470733a2f2f7374617469632e697368617070792e636e2f696d616765732f636c69656e742e776562636861742e706e67)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/db5594935dc93eebf2c1f4db7078902a5152e712513d645e19c3ba8c9e3a8f52?d=identicon)[st.one](/maintainers/st.one)

---

Top Contributors

[![isettle](https://avatars.githubusercontent.com/u/23184485?v=4)](https://github.com/isettle "isettle (9 commits)")

### Embed Badge

![Health badge](/badges/tianrang-ibok/health.svg)

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

PHPackages © 2026

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