添加网站文件

This commit is contained in:
2025-12-22 13:59:40 +08:00
commit 117aaf83d1
19468 changed files with 2111999 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Cvm\V20170312\CvmClient;
// 导入要请求接口对应的Request类
use TencentCloud\Cvm\V20170312\Models\DescribeInstancesRequest;
use TencentCloud\Cvm\V20170312\Models\Filter;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
//$cred = new Credential("secretId", "secretKey");
$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("cvm.ap-shanghai.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
//$httpProfile->setRootDomain("ap-shanghai.tencentcloudapi.com"); // 指定根域名默认为tencentcloudapi.com
//$httpProfile->setKeepAlive(true);
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以cvm为例)的client对象,clientProfile是可选的
$client = new CvmClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个cvm实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new DescribeInstancesRequest();
// 填充请求参数,这里request对象的成员变量即对应接口的入参
// 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
$respFilter = new Filter(); // 创建Filter对象, 以zone的维度来查询cvm实例
$respFilter->Name = "zone";
$respFilter->Values = ["ap-shanghai-1", "ap-shanghai-2"];
$req->Filters = [$respFilter]; // Filters 是成员为Filter对象的列表
// 这里还支持以标准json格式的string来赋值请求参数的方式。下面的代码跟上面的参数赋值是等效的
$params = [
"Filters" => [
[
"Name" => "zone",
"Values" => ["ap-shanghai-1", "ap-shanghai-2"]
]
]
];
$req->fromJsonString(json_encode($params));
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->DescribeInstances($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,29 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Cvm\V20170312\CvmClient;
// 导入要请求接口对应的Request类
use TencentCloud\Cvm\V20170312\Models\DescribeZonesRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
use TencentCloud\Common\Profile\ClientProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
$clientProfile = new ClientProfile();
//$clientProfile->setLanguage(ClientProfile::$ZH_CN);
$clientProfile->setSignMethod(ClientProfile::$SIGN_HMAC_SHA256);
// # 实例化要请求产品(以cvm为例)的client对象
$client = new CvmClient($cred, "ap-guangzhou", $clientProfile);
// 实例化一个请求对象
$req = new DescribeZonesRequest();
// 通过client对象调用想要访问的接口需要传入请求对象
$resp = $client->DescribeZones($req);
print_r($resp->toJsonString());
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,49 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Ecc\V20181213\EccClient;
// 导入要请求接口对应的Request类
use TencentCloud\Ecc\V20181213\Models\ECCRequest;
use TencentCloud\Ecc\V20181213\Models\ECCResponse;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
//$httpProfile->setReqMethod("post"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("ecc.ap-shanghai.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("HmacSHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new EccClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new ECCRequest();
$req->Content = "this composition content";
$resp = $client->ECC($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,30 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
use TencentCloud\Common\Credential;
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Scf\V20180416\ScfClient;
use TencentCloud\Scf\V20180416\Models\ListFunctionsRequest;
try {
$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
$httpProfile = new HttpProfile();
$httpProfile->setEndpoint("scf.tencentcloudapi.com");
$clientProfile = new ClientProfile();
$clientProfile->setHttpProfile($httpProfile);
$client = new ScfClient($cred, "ap-guangzhou", $clientProfile);
$req = new ListFunctionsRequest();
$params = '{}';
$req->fromJsonString($params);
$resp = $client->ListFunctions($req);
print_r($resp->toJsonString());
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,73 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\CallbackStatusStatisticsRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new CallbackStatusStatisticsRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
/* 偏移量 注目前固定设置为0 */
$req->Offset = 0;
/* 开始时间yyyymmddhh 需要拉取的起始时间,精确到小时 */
$req->StartDateTime = "2019122500";
/* 结束时间yyyymmddhh 需要拉取的截止时间,精确到小时
* 注EndDataTime 必须大于 StartDateTime */
$req->EndDataTime = "2019122523";
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->CallbackStatusStatistics($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,67 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\PullSmsReplyStatusRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new PullSmsReplyStatusRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->PullSmsReplyStatus($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,75 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\PullSmsReplyStatusByPhoneNumberRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new PullSmsReplyStatusByPhoneNumberRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
/* 偏移量 注目前固定设置为0 */
$req->Offset = 0;
/* 下发手机号码,采用 e.164 标准,+[国家或地区码][手机号]
* 示例如:+8613711112222 其中前面有一个+号 86为国家码13711112222为手机号*/
$req->PhoneNumber = "+8613711112222";
/* 拉取起始时间UNIX 时间戳(时间:秒) */
$req->SendDateTime = 1577232000;
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->PullSmsReplyStatusByPhoneNumber($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,67 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\PullSmsSendStatusRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new PullSmsSendStatusRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->PullSmsSendStatus($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,75 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\PullSmsSendStatusByPhoneNumberRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new PullSmsSendStatusByPhoneNumberRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
/* 偏移量 注目前固定设置为0 */
$req->Offset = 0;
/* 下发手机号码,采用 e.164 标准,+[国家或地区码][手机号]
* 示例如:+8613711112222 其中前面有一个+号 86为国家码13711112222为手机号*/
$req->PhoneNumber = "+8613711112222";
/* 拉取起始时间UNIX 时间戳(时间:秒) */
$req->SendDateTime = 1577232000;
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->PullSmsSendStatusByPhoneNumber($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,80 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\SendSmsRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new SendSmsRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 短信签名内容: 使用 UTF-8 编码,必须填写已审核通过的签名,签名信息可登录 [短信控制台] 查看 */
$req->Sign = "xxx";
/* 短信码号扩展号: 默认未开通,如需开通请联系 [sms helper] */
$req->ExtendCode = "0";
/* 下发手机号码,采用 e.164 标准,+[国家或地区码][手机号]
* 示例如:+8613711112222 其中前面有一个+号 86为国家码13711112222为手机号最多不要超过200个手机号*/
$req->PhoneNumberSet = array("+8613711112222");
/* 国际/港澳台短信 senderid: 国内短信填空,默认未开通,如需开通请联系 [sms helper] */
$req->SenderId = "xxx";
/* 用户的 session 内容: 可以携带用户侧 ID 等上下文信息server 会原样返回 */
$req->SessionContext = "xxx";
/* 模板 ID: 必须填写已审核通过的模板 ID。模板ID可登录 [短信控制台] 查看 */
$req->TemplateID = "449739";
/* 模板参数: 若无模板参数,则设置为空*/
$req->TemplateParamSet = array("0");
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->SendSms($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,73 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\SendStatusStatisticsRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new SendStatusStatisticsRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 拉取最大条数最多100条 */
$req->Limit = 10;
/* 偏移量 注目前固定设置为0 */
$req->Offset = 0;
/* 开始时间yyyymmddhh 需要拉取的起始时间,精确到小时 */
$req->StartDateTime = "2019122500";
/* 结束时间yyyymmddhh 需要拉取的截止时间,精确到小时
* 注EndDataTime 必须大于 StartDateTime */
$req->EndDataTime = "2019122523";
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->SendStatusStatistics($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,68 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Sms\V20190711\SmsClient;
// 导入要请求接口对应的Request类
use TencentCloud\Sms\V20190711\Models\SmsPackagesStatisticsRequest;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
/* 必要步骤:
* 实例化一个认证对象入参需要传入腾讯云账户密钥对secretIdsecretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* CAM密匙查询: https://console.cloud.tencent.com/cam/capi*/
$cred = new Credential("xxx", "xxx");
//$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("GET"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("sms.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
// 实例化要请求产品(以sms为例)的client对象,clientProfile是可选的
$client = new SmsClient($cred, "ap-shanghai", $clientProfile);
// 实例化一个 sms 发送短信请求对象,每个接口都会对应一个request对象。
$req = new SmsPackagesStatisticsRequest();
/* 填充请求参数,这里request对象的成员变量即对应接口的入参
* 你可以通过官网接口文档或跳转到request对象的定义处查看请求参数的定义
* 基本类型的设置:
* 帮助链接:
* 短信控制台: https://console.cloud.tencent.com/sms/smslist
* sms helper: https://cloud.tencent.com/document/product/382/3773 */
/* 短信应用ID: 短信SdkAppid在 [短信控制台] 添加应用后生成的实际SdkAppid示例如1400006666 */
$req->SmsSdkAppid = "1400787878";
/* 最大上限(需要拉取的套餐包个数) */
$req->Limit = 10;
/* 偏移量 注目前固定设置为0 */
$req->Offset = 0;
// 通过client对象调用DescribeInstances方法发起请求。注意请求方法名与请求对象是对应的
// 返回的resp是一个DescribeInstancesResponse类的实例与请求对象对应
$resp = $client->SmsPackagesStatistics($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
print_r($resp->TotalCount);
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,52 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Soe\V20180724\SoeClient;
// 导入要请求接口对应的Request类
use TencentCloud\Soe\V20180724\Models\InitOralProcessRequest;
use TencentCloud\Soe\V20180724\Models\InitOralProcess;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("soe.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new SoeClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new InitOralProcessRequest();
$req->RefText = "since";
$req->WorkMode = 0;
$req->EvalMode = 1;
$req->ScoreCoeff = 3.5;
$req->SessionId = "stress_test_956938";
$resp = $client->InitOralProcess($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,48 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\DescribeAITaskResultRequest;
use TencentCloud\Tci\V20190318\Models\DescribeAITaskResult;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new DescribeAITaskResultRequest();
$req->TaskId=2715135538;
$resp = $client->DescribeAITaskResult($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,53 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\SubmitFullBodyClassTaskRequest;
use TencentCloud\Tci\V20190318\Models\SubmitFullBodyClassTask;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new SubmitFullBodyClassTaskRequest();
$req->FileContent = "https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
$req->FileType = "vod_url";
$req->Lang = 0;
$req->LibrarySet = ["library_15603955264181591716"];
$req->VocabLibNameList = ["testlib2"];
$req->VoiceEncodeType = 1;
$req->VoiceFileType = 10;
$resp = $client->SubmitFullBodyClassTask($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,53 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\SubmitOneByOneClassTaskRequest;
use TencentCloud\Tci\V20190318\Models\SubmitOneByOneClassTask;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new SubmitOneByOneClassTaskRequest();
$req->FileContent = "https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
$req->FileType = "vod_url";
$req->Lang = 0;
$req->LibrarySet = ["library_15603955264181591716"];
$req->VocabLibNameList = ["testlib2"];
$req->VoiceEncodeType = 1;
$req->VoiceFileType = 10;
$resp = $client->SubmitOneByOneClassTask($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,51 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\SubmitOpenClassTaskRequest;
use TencentCloud\Tci\V20190318\Models\SubmitOpenClassTask;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new SubmitOpenClassTaskRequest();
$req->FileContent="https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
$req->FileType="vod_url";
$req->LibrarySet=["library_15603955264181591716"];
$resp = $client->SubmitOpenClassTask($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,53 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\SubmitPartialBodyClassTaskRequest;
use TencentCloud\Tci\V20190318\Models\SubmitPartialBodyClassTask;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new SubmitPartialBodyClassTaskRequest();
$req->FileContent = "https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
$req->FileType = "vod_url";
$req->Lang = 0;
$req->LibrarySet = ["library_15603955264181591716"];
$req->VocabLibNameList = ["testlib2"];
$req->VoiceEncodeType = 1;
$req->VoiceFileType = 10;
$resp = $client->SubmitPartialBodyClassTask($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}

View File

@@ -0,0 +1,49 @@
<?php
require_once __DIR__.'/../../../vendor/autoload.php';
// 导入对应产品模块的client
use TencentCloud\Tci\V20190318\TciClient;
// 导入要请求接口对应的Request类
use TencentCloud\Tci\V20190318\Models\SubmitTraditionalClassTaskRequest;
use TencentCloud\Tci\V20190318\Models\SubmitTraditionalClassTask;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Common\Credential;
// 导入可选配置类
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
try {
// 实例化一个证书对象入参需要传入腾讯云账户secretIdsecretKey
$cred = new Credential("", "");
//$cred = new Credential(getenv(""), getenv("");
// 实例化一个http选项可选的没有特殊需求可以跳过
$httpProfile = new HttpProfile();
$httpProfile->setReqMethod("POST"); // post请求(默认为post请求)
$httpProfile->setReqTimeout(30); // 请求超时时间,单位为秒(默认60秒)
$httpProfile->setEndpoint("tci.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
// 实例化一个client选项可选的没有特殊需求可以跳过
$clientProfile = new ClientProfile();
$clientProfile->setSignMethod("TC3-HMAC-SHA256"); // 指定签名算法(默认为HmacSHA256)
$clientProfile->setHttpProfile($httpProfile);
$client = new TciClient($cred, "", $clientProfile);
// 实例化一个ecc实例信息查询请求对象,每个接口都会对应一个request对象。
$req = new SubmitTraditionalClassTaskRequest();
$req->FileContent="https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
$req->FileType="vod_url";
$req->LibrarySet=["library_15603955264181591716"];
$resp = $client->SubmitTraditionalClassTask($req);
// 输出json格式的字符串回包
print_r($resp->toJsonString());
// 也可以取出单个值。
// 你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
}
catch(TencentCloudSDKException $e) {
echo $e;
}