PHP code example of 96qbhy / agora
1. Go to this page and download the library: Download 96qbhy/agora library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
96qbhy / agora example snippets
$config = [
'debug' => true,
'id' => 'your id',
'secret' => 'your secret',
];
$agora = new \Qbhy\Agora\Agora($config);
var_dump($agora->project->all()); // 获取所有项目
var_dump($agora->usage->get('2019-1-21','2019-1-22',['appid'])); // 获取用量
var_dump($agora->kicking_rule->all()); // 获取所有规则
var_dump($agora->token->buildToken('channel','uid')); // 生成token