PHP code example of imnpc / duobeiyun

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

    

imnpc / duobeiyun example snippets


use Imnpc\Duobeiyun\DuobeiyunApi;

$partnerId ="xxxx";
$appKey="xxxx";
$serverAddress = "https://api.duobeiyun.net";//官方目前拥有 api.duobeiyun.com  api.duobeiyun.net 2个接口  默认com的可不传递本参数

$client = new DuobeiyunApi($partnerId,$appKey,$serverAddress);
echo $client->createRoom(
    "测试多贝云",                  // title
    strtotime("2019/7/11 10:40"),   // startTime
    1,                              // duration
    DuobeiyunApi::$ROOM_HAS_VIDEO,  // video
    DuobeiyunApi::$ROOM_TYPE_1vN    // roomType
  );