Download the PHP package anchnetpkg/tencentcloud-sdk-php without Composer

On this page you can find all versions of the php package anchnetpkg/tencentcloud-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tencentcloud-sdk-php

简介

欢迎使用腾讯云开发者工具套件(SDK)3.0,SDK3.0是云 API3.0 平台的配套工具。目前已经支持cvm、vpc、cbs等产品,后续所有的云服务产品都会接入进来。新版SDK实现了统一化,具有各个语言版本的SDK使用方法相同,接口调用方式相同,统一的错误码和返回包格式这些优点。 为方便 PHP 开发者调试和接入腾讯云产品 API,这里向您介绍适用于 PHP 的腾讯云开发工具包,并提供首次使用开发工具包的简单示例。让您快速获取腾讯云 PHP SDK 并开始调用。

依赖环境

  1. PHP 5.6.33 版本及以上
  2. 从腾讯云控制台 开通相应产品
  3. 获取 SecretID、SecretKey 以及调用地址(endpoint),endpoint 一般形式为*.tencentcloudapi.com,如CVM 的调用地址为 cvm.tencentcloudapi.com,具体参考各产品说明。

获取安装

安装 PHP SDK 前,先获取安全凭证。在第一次使用云API之前,用户首先需要在腾讯云控制台上申请安全凭证,安全凭证包括 SecretID 和 SecretKey, SecretID 是用于标识 API 调用者的身份,SecretKey是用于加密签名字符串和服务器端验证签名字符串的密钥。SecretKey 必须严格保管,避免泄露。

通过 Composer 安装

通过 Composer 获取安装是使用 PHP SDK 的推荐方法,Composer 是 PHP 的依赖管理工具,支持您项目所需的依赖项,并将其安装到项目中。关于 Composer 详细可参考 Composer 官网 。

  1. 安装Composer: windows环境请访问Composer官网下载安装包安装。

    unix环境在命令行中执行以下命令安装。

    curl -sS https://getcomposer.org/installer | php

  2. 在 composer.json 的 require 结构体中加入依赖。注意这里的版本号只是举例,您可以在composer仓库上看到最新的版本号。

    "tencentcloud/tencentcloud-sdk-php": "3.0.6"

  3. 运行 composer install 下载安装 PHP SDK。
  4. 添加以下引用代码,引用方法可参考示例。

    require 'vendor/autoload.php';

通过源码包安装

  1. 前往 Github 代码托管地址 下载源码压缩包。
  2. 解压源码包到您项目合适的位置。
  3. 添加以下引用代码,引用方法可参考示例。

    require_once '../TCloudAutoLoader.php';

    示例

    以查询可用区接口为例:

更多示例

您可以在github中examples目录下找到更详细的示例。

旧版SDK

新版SDK兼容旧版SDK。旧版本的SDK存放于QcloudApi目录,但不再维护更新,推荐使用新版SDK。


All versions of tencentcloud-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.33
guzzlehttp/guzzle Version ^6.3
guzzlehttp/psr7 Version ^1.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anchnetpkg/tencentcloud-sdk-php contains the following files

Loading the files please wait ....