v1.0.3 2026-08-03 09:32 UTC
This package is auto-updated.
Last update: 2026-08-03 13:38:27 UTC
中文 | English
RequirementsPHP 5.5 and later
Installation & UsageComposerTo install the bindings via Composer, add the following to composer.json:
{
"require": {
"byteplus_sdk/byteplus-php-sdk-v2": "v1.0.0"
}
}
Then run composer install
Please follow the installation procedure
SDK 详细使用文档(凭证配置、Endpoint、Transport、超时、重试、异常处理、Debug)请参考:SDK 接入文档
Endpoint 设置如果您要自定义SDK的Endpoint,可以按照以下示例代码设置:
$config = \Byteplus\Common\Configuration::getDefaultConfiguration() ->setAk("Your AK") ->setSk("Your SK") ->setRegion("cn-beijing") ->setHost("ecs.cn-beijing-autodriving.byteplusapi.com");
Byteplus标准的Endpoint规则说明:
| Regional 服务 | Global 服务 |
|---|---|
{service}.{region}.byteplusapi.com 例如:云服务ecs在cn-beijing-autodriving Region域名为: ecs.cn-beijing-autodriving.byteplusapi.com |
{service}.byteplusapi.com 例如:访问控制iam为Global服务,域名为: iam.byteplusapi.com |
注:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $config = \Byteplus\Common\Configuration::getDefaultConfiguration() ->setAk("Your AK") ->setSk("Your SK") ->setRegion("cn-beijing"); $apiInstance = new \Byteplus\Vpc\Api\VPCApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Byteplus\Vpc\Model\CreateVpcRequest(); $body->setClientToken("token-123456789") ->setCidrBlock("192.168.0.0/16") ->setDnsServers(array("10.0.0.1", "10.1.1.2")); try { $result = $apiInstance->createVpc($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling VPCApi->createVpc: ', $e->getMessage(), PHP_EOL; } ?>Security and privacy
This project takes security seriously. For vulnerability reporting and supported versions, see SECURITY.md
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | shelfwatch/shelfwatch | 0 | 10 | 03-08-2026 |
| 2 | djeventplannerhub/djep-php-sdk | 0 | 18.33 | 03-08-2026 |
| 3 | jcolombo/optmyzr-api-php | 0 | 13.61 | 03-08-2026 |
| 4 | package-of-yii/collection | 0 | 40 | 03-08-2026 |
| 5 | snowman/ai | 0 | 8.1 | 03-08-2026 |
| 6 | lumnd/platophp | 0 | 17.69 | 03-08-2026 |
| 7 | lace/framework | 0 | 10 | 03-08-2026 |
| 8 | phpwind/phpwind | 0 | 10 | 03-08-2026 |
| 9 | wallet/wallet (2.22.1) | 0 | 17.69 | 28-07-2026 |
| 10 | ecomhouse/quantityswitch | 0 | 24.29 | 03-08-2026 |