PHP code example of xyqweb / aliyun-php-sdk

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

    

xyqweb / aliyun-php-sdk example snippets


$clientProfile = DefaultProfile::getProfile(
    $mps_region_id,
    $access_key_id,
    $access_key_secret
);
//If host is "0.0.0.0" or port is 0, no proxy is used(如果host为’0.0.0.0‘ 或者 port为0不使用代理)
$client = new DefaultAcsClient($clientProfile,[
'host' => '0.0.0.0',//Proxy server ip
'port' => 0 //Proxy server port,0
]);
shell
$ composer