12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- require_once __DIR__.'/../../../vendor/autoload.php';
-
- use TencentCloud\Sms\V20190711\SmsClient;
-
- 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 {
-
-
-
- $cred = new Credential("xxx", "xxx");
-
-
-
- $httpProfile = new HttpProfile();
- $httpProfile->setReqMethod("GET");
- $httpProfile->setReqTimeout(30);
- $httpProfile->setEndpoint("sms.tencentcloudapi.com");
-
-
- $clientProfile = new ClientProfile();
- $clientProfile->setSignMethod("TC3-HMAC-SHA256");
- $clientProfile->setHttpProfile($httpProfile);
-
-
- $client = new SmsClient($cred, "ap-shanghai", $clientProfile);
-
-
- $req = new SendStatusStatisticsRequest();
-
-
-
-
-
- $req->SmsSdkAppid = "1400787878";
-
- $req->Limit = 10;
-
- $req->Offset = 0;
-
- $req->StartDateTime = "2019122500";
-
-
- $req->EndDataTime = "2019122523";
-
-
-
- $resp = $client->SendStatusStatistics($req);
-
-
- print_r($resp->toJsonString());
-
-
-
- print_r($resp->TotalCount);
- }
- catch(TencentCloudSDKException $e) {
- echo $e;
- }
|