PHP code example of websquids / agora-php

1. Go to this page and download the library: Download websquids/agora-php 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/ */

    

websquids / agora-php example snippets




$config = [
    'debug'  => true,
    'id'     => 'your id',
    'secret' => 'your secret',
];

$agora = new \meteorTechnology\AgoraSDK\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'));
bash
$ composer