# aliyun-openapi-php-sdk **Repository Path**: xlerr/aliyun-openapi-php-sdk ## Basic Information - **Project Name**: aliyun-openapi-php-sdk - **Description**: Alibaba Cloud SDK for PHP - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-28 - **Last Updated**: 2024-06-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Open API SDK for php developers ## Requirements - PHP 5.3+ ## Build - to run unit tests, you will have to configure aliyun-sdk.properties files in your user directory, and make sure your project has corresponding service enabled, eg. openmr. ## Example ```php include_once '../aliyun-php-sdk-core/Config.php'; use Ecs\Request\V20140526 as Ecs; $iClientProfile = DefaultProfile::getProfile("cn-hangzhou", "", ""); $client = new DefaultAcsClient($iClientProfile); $request = new Ecs\DescribeRegionsRequest(); $request->setMethod("GET"); $response = $client->getAcsResponse($request); print_r($response); ``` ## Example for composer ```php include_once '../vendor/autoload.php'; use Ecs\Request\V20140526 as Ecs; Autoloader::addAutoloadPath("aliyun-php-sdk-ecs"); $endpoints = [ new Endpoint('cn-hangzhou', ['cn-hangzhou'], [ new ProductDomain('Ecs', 'ecs-cn-hangzhou.aliyuncs.com'), ]), ]; EndpointProvider::setEndpoints($endpoints); $iClientProfile = DefaultProfile::getProfile("cn-hangzhou", "", ""); $client = new DefaultAcsClient($iClientProfile); $request = new Ecs\DescribeRegionsRequest(); $request->setMethod("GET"); $response = $client->getAcsResponse($request); print_r($response); ``` ## Authors && Contributors - [Zuhe]() - [Ma Lijie](https://github.com/malijiefoxmail) ## License licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)