PHP code example of yangqing / aliyun-api-gateway

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

    

yangqing / aliyun-api-gateway example snippets


return [
    'app_id' => env('ALIYUN_API_APPID', ''), // 阿里云api授权应用的AppKey
    'app_secret' => env('ALIYUN_API_APP_SECRET', ''), // 阿里云api授权应用的AppSecret
    'hosts' => [ // 阿里云的接口域名
        'host1' => 'http://api.public.com',
    ],
];


    $c = new \YouMi\Aliyun\ApiGateway\ApiGateway();
    $data = $c->request($host, $path, $method, $params);