This commit is contained in:
XIGE
2026-02-23 19:48:13 +08:00
parent 3d6d25f535
commit 82a464dca2
351 changed files with 29816 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
require_once __DIR__ . '/../../autoload.php';
use Qiniu\Auth;
use Qiniu\Rtc\AppClient;
// 控制台获取密钥https://portal.qiniu.com/user/key
$accessKey = getenv('QINIU_ACCESS_KEY');
$secretKey = getenv('QINIU_SECRET_KEY');
$auth = new Auth($accessKey, $secretKey);
$client = new AppClient($auth);
// app 的唯一标识,创建的时候由系统生成
$appId = 'xxxx';
// 房间名称
$roomName = 'room01';
// 列出指定房间下当前所有用户
// 参考文档https://doc.qnsdk.com/rtn/docs/server_overview#2_2
list($ret, $err) = $client->listUser($appId, $roomName);
if ($err !== null) {
var_dump($err);
} else {
echo "\n====> User List: \n";
var_dump($ret);
}