PHP code example of easy-cloud-request / tencent

1. Go to this page and download the library: Download easy-cloud-request/tencent 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/ */

    

easy-cloud-request / tencent example snippets



use EasyCloudRequest\Tencent\Gateway;

$request = new RequestBag(
    'GET',
    'https://ssl.tencentcloudapi.com/',
    [
        "Action" => 'DescribeCertificates',
        "Version" => '2019-12-05',
        'Region' => '',
    ],
);

$cloud = new SimpleCloud([
    'default' => Gateway::class,
    'gateway' => [
        'volc' => [
            'ak' => 'your ak',
            'sk' => 'your sk',
        ]
    ],
    'http_options' => [
        "http_errors" => false,
        "proxy" => [],
        "verify" => false,
        "timeout" => 120,
        "connect_timeout" => 60,
    ]
]);
$result = $cloud->requests($request);
var_dump($result);