PHP code example of codeages / qiqiuyun-php-sdk

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

    

codeages / qiqiuyun-php-sdk example snippets


$sdk = new \QiQiuYun\SDK\QiQiuYunSDK(array(
    'access_key' => 'your_access_key', // 必需
    'secret_key' => 'your_secret_key', // 必需
    'service' => array(     // 可选,各个服务的配置项
        'xapi' => array(    // 每个服务,都有自己的必需的配置项,如需调用则必需配置该服务的配置项
            'school_name' => '测试网校',
        )
    )
));

// 获取短信服务
$sdk->getSmsService();

// 获取云资源播放服务
$sdk->getPlayService();

// 获取XAPI服务
$sdk->getXAPIService();

// 获取分销服务
$sdk->getDrpService();

$sdk = new \QiQiuYun\SDK\QiQiuYunSDK(array(
    'access_key' => 'your_access_key', 
    'secret_key' => 'your_secret_key', 
    'service' => array(
        'sms' => array(
            'host' => 'sms-service.test.qiqiuyun.net',
        )
    )
));

$sdk->getSmsService();
shell
composer