PHP code example of aliyunapi / php-aliyun-open-api-cdn

1. Go to this page and download the library: Download aliyunapi/php-aliyun-open-api-cdn 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/ */

    

aliyunapi / php-aliyun-open-api-cdn example snippets


php composer.phar 

"aliyunapi/php-aliyun-open-api-cdn": "~1.0"

$client = new \aliyun\cdn\Client([
    'accessKeyId' => '123456',
    'accessSecret' => '123456'
]);

//@sec https://help.aliyun.com/document_detail/27158.html
$package = [
    'Action' => 'DescribeCdnService',
    //etc...
];
$response = $client->createRequest($package);
print_r($response);
exit;