This topic describes how to install PHP SDK and provides an operation example.


To download PHP SDK, click PHP SDK.


The following is an example of how to create a RAM user by using PHP SDK:

include_once 'aliyun-php-sdk-core/Config.php';
use Ram\Request\V20150501 as Ram;

// Construct an Alibaba Cloud client to initiate a request.
// Set the access key ID and access key secret.
// Alibaba Cloud Resource Access Management (RAM) is a global service. Its API endpoint is China (Hangzhou). Here, set "Region" to "cn-hangzhou".
$iClientProfile = DefaultProfile::getProfile("cn-hangzhou", "<acccess-key-id>", "<access-key-secret>");
$client = new DefaultAcsClient($iClientProfile);

// Construct the "CreateUser" request.
$request = new Ram\CreateUserRequest();
// Set the "UserName" parameter.

// Initiate a request and obtain a response.
$response = $client->doAction($request);