PHPackages                             volcengine/volcengine-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. volcengine/volcengine-php-sdk

ActiveLibrary

volcengine/volcengine-php-sdk
=============================

v1.0.105(2d ago)105.2k↑69.1%9[2 PRs](https://github.com/volcengine/volcengine-php-sdk/pulls)Apache-2.0PHPPHP &gt;=5.5

Since Jun 7Pushed 2d ago1 watchersCompare

[ Source](https://github.com/volcengine/volcengine-php-sdk)[ Packagist](https://packagist.org/packages/volcengine/volcengine-php-sdk)[ RSS](/packages/volcengine-volcengine-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (1)Versions (108)Used By (0)

中文 | [English](README.EN.MD)

Volcengine SDK for PHP
======================

[](#volcengine-sdk-for-php)

Requirements
------------

[](#requirements)

PHP 5.5 and later

Installation &amp; Usage
------------------------

[](#installation--usage)

### Composer

[](#composer)

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "require": {
    "volcengine/volcengine-php-sdk": "v1.0.105"
  }
}

```

Then run `composer install`

Getting Started
---------------

[](#getting-started)

Please follow the [installation procedure](#installation--usage)

##### Endpoint 设置

[](#endpoint-设置)

如果您要自定义SDK的Endpoint，可以按照以下示例代码设置：

```
$config = \Volcengine\Common\Configuration::getDefaultConfiguration()
    ->setAk("Your AK")
    ->setSk("Your SK")
    ->setRegion("cn-beijing")
    ->setHost("ecs.cn-beijing-autodriving.volcengineapi.com");
```

火山引擎标准的Endpoint规则说明：

Regional 服务Global 服务`{service}.{region}.volcengineapi.com`
 例如：云服务ecs在cn-beijing-autodriving Region域名为： `ecs.cn-beijing-autodriving.volcengineapi.com``{service}.volcengineapi.com`
 例如：访问控制iam为Global服务，域名为：`iam.volcengineapi.com`注：

- Service中存在\_符号时，Endpoint时需转为-符号。存在大写字母时需转成小写。

##### SDK 示例

[](#sdk-示例)

```
