diff --git a/docs/sms_api.rst b/docs/sms_api.rst index 55301bbb..271ac3ad 100644 --- a/docs/sms_api.rst +++ b/docs/sms_api.rst @@ -94,3 +94,29 @@ https://github.com/AsamK/signal-cli#readme $signal_user = '+18881234567'; $signal_config = ''; $signal_cli = ''; + +Aliyun +------ + +Provider website: https://www.aliyun.com + +Code sample provided in SSP sources: +https://raw.githubusercontent.com/ltb-project/self-service-password/master/lib/smsapi-aliyun.inc.php + +Go to lib/aliyun-dysms-php-sdk/api_demo and type: + +.. code:: sh + + composer install + +Then you can enable it in configuration: + +.. code:: php + + $sms_api_lib = "lib/aliyun-dysms-php-sdk/api_demo/SmsDemo.php"; + $accessKeyId = "xxxxx"; + $accessKeySecret = "xxxxxx"; + $region = "xxxxx" + $endPointName = "xxxxx"; + $request->setSignName("xxxxxx"); + $request->setTemplateCode("xxxxxxx"); \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_demo/SmsDemo.php b/lib/aliyun-dysms-php-sdk/api_demo/SmsDemo.php new file mode 100644 index 00000000..d1e7d29a --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_demo/SmsDemo.php @@ -0,0 +1,191 @@ +setProtocol("https"); + + // 必填,设置短信接收号码 + $request->setPhoneNumbers("$mobile"); + + // 必填,设置签名名称,应严格按"签名名称"填写,请参考: https://dysms.console.aliyun.com/dysms.htm#/develop/sign + $request->setSignName("xxxxxx"); + + // 必填,设置模板CODE,应严格按"模板CODE"填写, 请参考: https://dysms.console.aliyun.com/dysms.htm#/develop/template + $request->setTemplateCode("xxxxxxx"); + + // 可选,设置模板参数, 假如模板中存在变量需要替换则为必填项 + $request->setTemplateParam(json_encode(array( // 短信模板中字段的值 + "code"=>"$message", + ), JSON_UNESCAPED_UNICODE)); + + // 可选,设置流水号 + $request->setOutId("yourOutId"); + + // 选填,上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段) + $request->setSmsUpExtendCode("1234567"); + + // 发起访问请求 + $acsResponse = static::getAcsClient()->getAcsResponse($request); + + return $acsResponse; + } + + /** + * 批量发送短信 + * @return stdClass + */ + public static function sendBatchSms() { + + // 初始化SendSmsRequest实例用于设置发送短信的参数 + $request = new SendBatchSmsRequest(); + + //可选-启用https协议 + //$request->setProtocol("https"); + + // 必填:待发送手机号。支持JSON格式的批量调用,批量上限为100个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式 + $request->setPhoneNumberJson(json_encode(array( + "1500000000", + "1500000001", + ), JSON_UNESCAPED_UNICODE)); + + // 必填:短信签名-支持不同的号码发送不同的短信签名 + $request->setSignNameJson(json_encode(array( + "云通信", + "云通信" + ), JSON_UNESCAPED_UNICODE)); + + // 必填:短信模板-可在短信控制台中找到 + $request->setTemplateCode("SMS_1000000"); + + // 必填:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 + // 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败 + $request->setTemplateParamJson(json_encode(array( + array( + "name" => "Tom", + "code" => "123", + ), + array( + "name" => "Jack", + "code" => "456", + ), + ), JSON_UNESCAPED_UNICODE)); + + // 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段) + // $request->setSmsUpExtendCodeJson("[\"90997\",\"90998\"]"); + + // 发起访问请求 + $acsResponse = static::getAcsClient()->getAcsResponse($request); + + return $acsResponse; + } + + /** + * 短信发送记录查询 + * @return stdClass + */ + public static function querySendDetails() { + + // 初始化QuerySendDetailsRequest实例用于设置短信查询的参数 + $request = new QuerySendDetailsRequest(); + + //可选-启用https协议 + //$request->setProtocol("https"); + + // 必填,短信接收号码 + $request->setPhoneNumber("12345678901"); + + // 必填,短信发送日期,格式Ymd,支持近30天记录查询 + $request->setSendDate("20170718"); + + // 必填,分页大小 + $request->setPageSize(10); + + // 必填,当前页码 + $request->setCurrentPage(1); + + // 选填,短信发送流水号 + $request->setBizId("yourBizId"); + + // 发起访问请求 + $acsResponse = static::getAcsClient()->getAcsResponse($request); + + return $acsResponse; + } + +} + + +#$response = SmsDemo::sendSms("xxxxx","123456"); +#echo "发送短信(sendSms)接口返回的结果:\n"; +#print_r($response); \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/LICENSE b/lib/aliyun-dysms-php-sdk/api_sdk/LICENSE new file mode 100644 index 00000000..7f7950e9 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/LICENSE @@ -0,0 +1,16 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/composer.json b/lib/aliyun-dysms-php-sdk/api_sdk/composer.json new file mode 100644 index 00000000..07fbd9ce --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/composer.json @@ -0,0 +1,24 @@ +{ + "name": "aliyuncs/aliyun-dysms-php-sdk", + "description": "Aliyun SMS SDK for PHP", + "keywords": [ "aliyun", "SMS", "sdk" ], + "type": "library", + "license": "Apache-2.0", + "homepage": "https://www.aliyun.com/product/sms", + "authors": [ + { + "name": "Aliyuncs", + "homepage": "https://www.aliyun.com" + } + ], + "require": { + "php": ">=5.5.0" + }, + "require-dev": {}, + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Aliyun\\": "lib/" + } + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/composer.lock b/lib/aliyun-dysms-php-sdk/api_sdk/composer.lock new file mode 100644 index 00000000..1af3051e --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "e6fcb8fd9ccf5556fdaaedfd9a4d638f", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5.0" + }, + "platform-dev": [] +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/.DS_Store b/lib/aliyun-dysms-php-sdk/api_sdk/lib/.DS_Store new file mode 100644 index 00000000..f783267d Binary files /dev/null and b/lib/aliyun-dysms-php-sdk/api_sdk/lib/.DS_Store differ diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/.DS_Store b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/.DS_Store new file mode 100644 index 00000000..88d359b4 Binary files /dev/null and b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/.DS_Store differ diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/.DS_Store b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/.DS_Store new file mode 100644 index 00000000..8a30c5e0 Binary files /dev/null and b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/.DS_Store differ diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/.DS_Store b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/.DS_Store new file mode 100644 index 00000000..874b1748 Binary files /dev/null and b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/.DS_Store differ diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QueryInterSmsIsoInfoRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QueryInterSmsIsoInfoRequest.php new file mode 100644 index 00000000..dcbf76bd --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QueryInterSmsIsoInfoRequest.php @@ -0,0 +1,76 @@ +setMethod("POST"); + } + + private $resourceOwnerAccount; + + private $countryName; + + private $resourceOwnerId; + + private $ownerId; + + public function getResourceOwnerAccount() { + return $this->resourceOwnerAccount; + } + + public function setResourceOwnerAccount($resourceOwnerAccount) { + $this->resourceOwnerAccount = $resourceOwnerAccount; + $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; + } + + public function getCountryName() { + return $this->countryName; + } + + public function setCountryName($countryName) { + $this->countryName = $countryName; + $this->queryParameters["CountryName"]=$countryName; + } + + public function getResourceOwnerId() { + return $this->resourceOwnerId; + } + + public function setResourceOwnerId($resourceOwnerId) { + $this->resourceOwnerId = $resourceOwnerId; + $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; + } + + public function getOwnerId() { + return $this->ownerId; + } + + public function setOwnerId($ownerId) { + $this->ownerId = $ownerId; + $this->queryParameters["OwnerId"]=$ownerId; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QuerySendDetailsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QuerySendDetailsRequest.php new file mode 100644 index 00000000..34323fe2 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/QuerySendDetailsRequest.php @@ -0,0 +1,103 @@ +setMethod("POST"); + } + + private $sendDate; + + private $pageSize; + + private $phoneNumber; + + private $resourceOwnerAccount; + + private $currentPage; + + private $bizId; + + private $resourceOwnerId; + + private $ownerId; + + public function getSendDate() { + return $this->sendDate; + } + + public function setSendDate($sendDate) { + $this->sendDate = $sendDate; + $this->queryParameters["SendDate"]=$sendDate; + } + + public function getPageSize() { + return $this->pageSize; + } + + public function setPageSize($pageSize) { + $this->pageSize = $pageSize; + $this->queryParameters["PageSize"]=$pageSize; + } + + public function getPhoneNumber() { + return $this->phoneNumber; + } + + public function setPhoneNumber($phoneNumber) { + $this->phoneNumber = $phoneNumber; + $this->queryParameters["PhoneNumber"]=$phoneNumber; + } + + public function getResourceOwnerAccount() { + return $this->resourceOwnerAccount; + } + + public function setResourceOwnerAccount($resourceOwnerAccount) { + $this->resourceOwnerAccount = $resourceOwnerAccount; + $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; + } + + public function getCurrentPage() { + return $this->currentPage; + } + + public function setCurrentPage($currentPage) { + $this->currentPage = $currentPage; + $this->queryParameters["CurrentPage"]=$currentPage; + } + + public function getBizId() { + return $this->bizId; + } + + public function setBizId($bizId) { + $this->bizId = $bizId; + $this->queryParameters["BizId"]=$bizId; + } + + public function getResourceOwnerId() { + return $this->resourceOwnerId; + } + + public function setResourceOwnerId($resourceOwnerId) { + $this->resourceOwnerId = $resourceOwnerId; + $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; + } + + public function getOwnerId() { + return $this->ownerId; + } + + public function setOwnerId($ownerId) { + $this->ownerId = $ownerId; + $this->queryParameters["OwnerId"]=$ownerId; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendBatchSmsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendBatchSmsRequest.php new file mode 100644 index 00000000..d11c3f8a --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendBatchSmsRequest.php @@ -0,0 +1,121 @@ +setMethod("POST"); + } + + private $templateCode; + + private $templateParamJson; + + private $resourceOwnerAccount; + + private $smsUpExtendCodeJson; + + private $resourceOwnerId; + + private $signNameJson; + + private $ownerId; + + private $phoneNumberJson; + + public function getTemplateCode() { + return $this->templateCode; + } + + public function setTemplateCode($templateCode) { + $this->templateCode = $templateCode; + $this->queryParameters["TemplateCode"]=$templateCode; + } + + public function getTemplateParamJson() { + return $this->templateParamJson; + } + + public function setTemplateParamJson($templateParamJson) { + $this->templateParamJson = $templateParamJson; + $this->queryParameters["TemplateParamJson"]=$templateParamJson; + } + + public function getResourceOwnerAccount() { + return $this->resourceOwnerAccount; + } + + public function setResourceOwnerAccount($resourceOwnerAccount) { + $this->resourceOwnerAccount = $resourceOwnerAccount; + $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; + } + + public function getSmsUpExtendCodeJson() { + return $this->smsUpExtendCodeJson; + } + + public function setSmsUpExtendCodeJson($smsUpExtendCodeJson) { + $this->smsUpExtendCodeJson = $smsUpExtendCodeJson; + $this->queryParameters["SmsUpExtendCodeJson"]=$smsUpExtendCodeJson; + } + + public function getResourceOwnerId() { + return $this->resourceOwnerId; + } + + public function setResourceOwnerId($resourceOwnerId) { + $this->resourceOwnerId = $resourceOwnerId; + $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; + } + + public function getSignNameJson() { + return $this->signNameJson; + } + + public function setSignNameJson($signNameJson) { + $this->signNameJson = $signNameJson; + $this->queryParameters["SignNameJson"]=$signNameJson; + } + + public function getOwnerId() { + return $this->ownerId; + } + + public function setOwnerId($ownerId) { + $this->ownerId = $ownerId; + $this->queryParameters["OwnerId"]=$ownerId; + } + + public function getPhoneNumberJson() { + return $this->phoneNumberJson; + } + + public function setPhoneNumberJson($phoneNumberJson) { + $this->phoneNumberJson = $phoneNumberJson; + $this->queryParameters["PhoneNumberJson"]=$phoneNumberJson; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendInterSmsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendInterSmsRequest.php new file mode 100644 index 00000000..6245108c --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendInterSmsRequest.php @@ -0,0 +1,131 @@ +setMethod("POST"); + } + + private $templateCode; + + private $phoneNumbers; + + private $countryCode; + + private $signName; + + private $resourceOwnerAccount; + + private $templateParam; + + private $resourceOwnerId; + + private $ownerId; + + private $outId; + + public function getTemplateCode() { + return $this->templateCode; + } + + public function setTemplateCode($templateCode) { + $this->templateCode = $templateCode; + $this->queryParameters["TemplateCode"]=$templateCode; + } + + public function getPhoneNumbers() { + return $this->phoneNumbers; + } + + public function setPhoneNumbers($phoneNumbers) { + $this->phoneNumbers = $phoneNumbers; + $this->queryParameters["PhoneNumbers"]=$phoneNumbers; + } + + public function getCountryCode() { + return $this->countryCode; + } + + public function setCountryCode($countryCode) { + $this->countryCode = $countryCode; + $this->queryParameters["CountryCode"]=$countryCode; + } + + public function getSignName() { + return $this->signName; + } + + public function setSignName($signName) { + $this->signName = $signName; + $this->queryParameters["SignName"]=$signName; + } + + public function getResourceOwnerAccount() { + return $this->resourceOwnerAccount; + } + + public function setResourceOwnerAccount($resourceOwnerAccount) { + $this->resourceOwnerAccount = $resourceOwnerAccount; + $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; + } + + public function getTemplateParam() { + return $this->templateParam; + } + + public function setTemplateParam($templateParam) { + $this->templateParam = $templateParam; + $this->queryParameters["TemplateParam"]=$templateParam; + } + + public function getResourceOwnerId() { + return $this->resourceOwnerId; + } + + public function setResourceOwnerId($resourceOwnerId) { + $this->resourceOwnerId = $resourceOwnerId; + $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; + } + + public function getOwnerId() { + return $this->ownerId; + } + + public function setOwnerId($ownerId) { + $this->ownerId = $ownerId; + $this->queryParameters["OwnerId"]=$ownerId; + } + + public function getOutId() { + return $this->outId; + } + + public function setOutId($outId) { + $this->outId = $outId; + $this->queryParameters["OutId"]=$outId; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendSmsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendSmsRequest.php new file mode 100644 index 00000000..4e8fb0fd --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Api/Sms/Request/V20170525/SendSmsRequest.php @@ -0,0 +1,113 @@ +setMethod("POST"); + } + + private $templateCode; + + private $phoneNumbers; + + private $signName; + + private $resourceOwnerAccount; + + private $templateParam; + + private $resourceOwnerId; + + private $ownerId; + + private $outId; + + private $smsUpExtendCode; + + public function getTemplateCode() { + return $this->templateCode; + } + + public function setTemplateCode($templateCode) { + $this->templateCode = $templateCode; + $this->queryParameters["TemplateCode"]=$templateCode; + } + + public function getPhoneNumbers() { + return $this->phoneNumbers; + } + + public function setPhoneNumbers($phoneNumbers) { + $this->phoneNumbers = $phoneNumbers; + $this->queryParameters["PhoneNumbers"]=$phoneNumbers; + } + + public function getSignName() { + return $this->signName; + } + + public function setSignName($signName) { + $this->signName = $signName; + $this->queryParameters["SignName"]=$signName; + } + + public function getResourceOwnerAccount() { + return $this->resourceOwnerAccount; + } + + public function setResourceOwnerAccount($resourceOwnerAccount) { + $this->resourceOwnerAccount = $resourceOwnerAccount; + $this->queryParameters["ResourceOwnerAccount"]=$resourceOwnerAccount; + } + + public function getTemplateParam() { + return $this->templateParam; + } + + public function setTemplateParam($templateParam) { + $this->templateParam = $templateParam; + $this->queryParameters["TemplateParam"]=$templateParam; + } + + public function getResourceOwnerId() { + return $this->resourceOwnerId; + } + + public function setResourceOwnerId($resourceOwnerId) { + $this->resourceOwnerId = $resourceOwnerId; + $this->queryParameters["ResourceOwnerId"]=$resourceOwnerId; + } + + public function getOwnerId() { + return $this->ownerId; + } + + public function setOwnerId($ownerId) { + $this->ownerId = $ownerId; + $this->queryParameters["OwnerId"]=$ownerId; + } + + public function getOutId() { + return $this->outId; + } + + public function setOutId($outId) { + $this->outId = $outId; + $this->queryParameters["OutId"]=$outId; + } + + public function getSmsUpExtendCode() { + return $this->smsUpExtendCode; + } + + public function setSmsUpExtendCode($smsUpExtendCode) { + $this->smsUpExtendCode = $smsUpExtendCode; + $this->queryParameters["SmsUpExtendCode"]=$smsUpExtendCode; + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/.DS_Store b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/.DS_Store new file mode 100644 index 00000000..3fa21bbe Binary files /dev/null and b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/.DS_Store differ diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsRequest.php new file mode 100644 index 00000000..571f8fda --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsRequest.php @@ -0,0 +1,125 @@ +headers["x-sdk-client"] = "php/2.0.0"; + $this->product = $product; + $this->version = $version; + $this->actionName = $actionName; + } + + public abstract function composeUrl($iSigner, $credential, $domain); + + public function getVersion() + { + return $this->version; + } + + public function setVersion($version) + { + $this->version = $version; + } + + public function getProduct() + { + return $this->product; + } + + public function setProduct($product) + { + $this->product = $product; + } + + public function getActionName() + { + return $this->actionName; + } + + public function setActionName($actionName) + { + $this->actionName = $actionName; + } + + public function getAcceptFormat() + { + return $this->acceptFormat; + } + + public function setAcceptFormat($acceptFormat) + { + $this->acceptFormat = $acceptFormat; + } + + public function getQueryParameters() + { + return $this->queryParameters; + } + + public function getHeaders() + { + return $this->headers; + } + + public function getMethod() + { + return $this->method; + } + + public function setMethod($method) + { + $this->method = $method; + } + + public function getProtocol() + { + return $this->protocolType; + } + + public function setProtocol($protocol) + { + $this->protocolType = $protocol; + } + + public function getRegionId() + { + return $this->regionId; + } + public function setRegionId($region) + { + $this->regionId = $region; + } + + public function getContent() + { + return $this->content; + } + + public function setContent($content) + { + $this->content = $content; + } + + + public function addHeader($headerKey, $headerValue) + { + $this->headers[$headerKey] = $headerValue; + } + + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsResponse.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsResponse.php new file mode 100644 index 00000000..57cddf1f --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/AcsResponse.php @@ -0,0 +1,29 @@ +code; + } + + public function setCode($code) + { + $this->code = $code; + } + + public function getMessage() + { + return $this->message; + } + + public function setMessage($message) + { + $this->message = $message; + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/Credential.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/Credential.php new file mode 100644 index 00000000..92bf2b2b --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/Credential.php @@ -0,0 +1,72 @@ +accessKeyId = $accessKeyId; + $this->accessSecret = $accessSecret; + $this->refreshDate = date($this->dateTimeFormat); + } + + public function isExpired() + { + if($this->expiredDate == null) + { + return false; + } + if(strtotime($this->expiredDate)>date($this->dateTimeFormat)) + { + return false; + } + return true; + } + + public function getRefreshDate() + { + return $this->refreshDate; + } + + public function getExpiredDate() + { + return $this->expiredDate; + } + + public function setExpiredDate($expiredHours) + { + if($expiredHours>0) + { + return $this->expiredDate = date($this->dateTimeFormat, strtotime("+".$expiredHours." hour")); + } + } + + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + public function setAccessKeyId($accessKeyId) + { + $this->accessKeyId = $accessKeyId; + } + + public function getAccessSecret() + { + return $this->accessSecret; + } + + public function setAccessSecret($accessSecret) + { + $this->accessSecret = $accessSecret; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/ISigner.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/ISigner.php new file mode 100644 index 00000000..c7475168 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Auth/ISigner.php @@ -0,0 +1,12 @@ +iClientProfile = $iClientProfile; + $this->__urlTestFlag__ = false; + } + + public function getAcsResponse($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) + { + $httpResponse = $this->doActionImpl($request, $iSigner, $credential, $autoRetry, $maxRetryNumber); + $respObject = $this->parseAcsResponse($httpResponse->getBody(), $request->getAcceptFormat()); + if(false == $httpResponse->isSuccess()) + { + $this->buildApiException($respObject, $httpResponse->getStatus()); + } + return $respObject; + } + + private function doActionImpl($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) + { + if(null == $this->iClientProfile && (null == $iSigner || null == $credential + || null == $request->getRegionId() || null == $request->getAcceptFormat())) + { + throw new ClientException("No active profile found.", "SDK.InvalidProfile"); + } + if(null == $iSigner) + { + $iSigner = $this->iClientProfile->getSigner(); + } + if(null == $credential) + { + $credential = $this->iClientProfile->getCredential(); + } + $request = $this->prepareRequest($request); + $domain = EndpointProvider::findProductDomain($request->getRegionId(), $request->getProduct()); + + if(null == $domain) + { + throw new ClientException("Can not find endpoint to access.", "SDK.InvalidRegionId"); + } + $requestUrl = $request->composeUrl($iSigner, $credential, $domain); + + if ($this->__urlTestFlag__) { + throw new ClientException($requestUrl, "URLTestFlagIsSet"); + } + + if(count($request->getDomainParameter())>0){ + $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getDomainParameter(), $request->getHeaders()); + } else { + $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getContent(), $request->getHeaders()); + } + + $retryTimes = 1; + while (500 <= $httpResponse->getStatus() && $autoRetry && $retryTimes < $maxRetryNumber) { + $requestUrl = $request->composeUrl($iSigner, $credential,$domain); + + if(count($request->getDomainParameter())>0){ + $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getDomainParameter(), $request->getHeaders()); + } else { + $httpResponse = HttpHelper::curl($requestUrl, $request->getMethod(), $request->getContent(), $request->getHeaders()); + } + $retryTimes ++; + } + return $httpResponse; + } + + public function doAction($request, $iSigner = null, $credential = null, $autoRetry = true, $maxRetryNumber = 3) + { + trigger_error("doAction() is deprecated. Please use getAcsResponse() instead.", E_USER_NOTICE); + return $this->doActionImpl($request, $iSigner, $credential, $autoRetry, $maxRetryNumber); + } + + private function prepareRequest($request) + { + if(null == $request->getRegionId()) + { + $request->setRegionId($this->iClientProfile->getRegionId()); + } + if(null == $request->getAcceptFormat()) + { + $request->setAcceptFormat($this->iClientProfile->getFormat()); + } + if(null == $request->getMethod()) + { + $request->setMethod("GET"); + } + return $request; + } + + + private function buildApiException($respObject, $httpStatus) + { + throw new ServerException($respObject->Message, $respObject->Code, $httpStatus, $respObject->RequestId); + } + + private function parseAcsResponse($body, $format) + { + if ("JSON" == $format) + { + $respObject = json_decode($body); + } + else if("XML" == $format) + { + $respObject = @simplexml_load_string($body); + } + else if("RAW" == $format) + { + $respObject = $body; + } + return $respObject; + } +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ClientException.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ClientException.php new file mode 100644 index 00000000..537cf307 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ClientException.php @@ -0,0 +1,50 @@ +errorMessage = $errorMessage; + $this->errorCode = $errorCode; + $this->setErrorType("Client"); + } + + private $errorCode; + private $errorMessage; + private $errorType; + + public function getErrorCode() + { + return $this->errorCode; + } + + public function setErrorCode($errorCode) + { + $this->errorCode = $errorCode; + } + + public function getErrorMessage() + { + return $this->errorMessage; + } + + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + } + + public function getErrorType() + { + return $this->errorType; + } + + public function setErrorType($errorType) + { + $this->errorType = $errorType; + } + + +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ServerException.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ServerException.php new file mode 100644 index 00000000..1fa4d44b --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Exception/ServerException.php @@ -0,0 +1,31 @@ +setErrorMessage($errorMessage); + $this->setErrorType("Server"); + $this->httpStatus = $httpStatus; + $this->requestId = $requestId; + } + + public function getHttpStatus() + { + return $this->httpStatus; + } + + public function getRequestId() + { + return $this->requestId; + } + +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpHelper.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpHelper.php new file mode 100644 index 00000000..adf49dd7 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpHelper.php @@ -0,0 +1,69 @@ + 5 && strtolower(substr($url,0,5)) == "https" ) { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + } + if (is_array($headers) && 0 < count($headers)) + { + $httpHeaders =self::getHttpHearders($headers); + curl_setopt($ch,CURLOPT_HTTPHEADER,$httpHeaders); + } + $httpResponse = new HttpResponse(); + $httpResponse->setBody(curl_exec($ch)); + $httpResponse->setStatus(curl_getinfo($ch, CURLINFO_HTTP_CODE)); + if (curl_errno($ch)) + { + throw new ClientException("Server unreachable: Errno: " . curl_errno($ch) . " " . curl_error($ch), "SDK.ServerUnreachable"); + } + curl_close($ch); + return $httpResponse; + } + static function getPostHttpBody($postFildes){ + $content = ""; + foreach ($postFildes as $apiParamKey => $apiParamValue) + { + $content .= "$apiParamKey=" . urlencode($apiParamValue) . "&"; + } + return substr($content, 0, -1); + } + static function getHttpHearders($headers) + { + $httpHeader = array(); + foreach ($headers as $key => $value) + { + array_push($httpHeader, $key.":".$value); + } + return $httpHeader; + } +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpResponse.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpResponse.php new file mode 100644 index 00000000..df93ec35 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Http/HttpResponse.php @@ -0,0 +1,38 @@ +body; + } + + public function setBody($body) + { + $this->body = $body; + } + + public function getStatus() + { + return $this->status; + } + + public function setStatus($status) + { + $this->status = $status; + } + + public function isSuccess() + { + if(200 <= $this->status && 300 > $this->status) + { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/IAcsClient.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/IAcsClient.php new file mode 100644 index 00000000..b4f548b2 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/IAcsClient.php @@ -0,0 +1,7 @@ + $endpoint) + { + if($endpoint->getName() == $endpointName) + { + return $endpoint; + } + } + } + + private static function addEndpoint_($endpointName,$regionId, $product, $domain) + { + $regionIds = array($regionId); + $productDomains = array(new ProductDomain($product, $domain)); + $endpoint = new Endpoint($endpointName, $regionIds, $productDomains); + array_push(self::$endpoints, $endpoint); + } + + private static function updateEndpoint($regionId, $product, $domain, $endpoint) + { + $regionIds = $endpoint->getRegionIds(); + if(!in_array($regionId,$regionIds)) + { + array_push($regionIds, $regionId); + $endpoint->setRegionIds($regionIds); + } + + $productDomains = $endpoint->getProductDomains(); + if(null == self::findProductDomain($productDomains, $product, $domain)) + { + array_push($productDomains, new ProductDomain($product, $domain)); + } + $endpoint->setProductDomains($productDomains); + } + + private static function findProductDomain($productDomains, $product, $domain) + { + foreach ($productDomains as $key => $productDomain) + { + if($productDomain->getProductName() == $product && $productDomain->getDomainName() == $domain) + { + return $productDomain; + } + } + return null; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Profile/IClientProfile.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Profile/IClientProfile.php new file mode 100644 index 00000000..36670184 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Profile/IClientProfile.php @@ -0,0 +1,14 @@ +name = $name; + $this->regionIds = $regionIds; + $this->productDomains = $productDomains; + } + + public function getName() + { + return $this->name; + } + + public function setName($name) + { + $this->name = $name; + } + + public function getRegionIds() + { + return $this->regionIds; + } + + public function setRegionIds($regionIds) + { + $this->regionIds = $regionIds; + } + + public function getProductDomains() + { + return $this->productDomains; + } + + public function setProductDomains($productDomains) + { + $this->productDomains = $productDomains; + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/EndpointConfig.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/EndpointConfig.php new file mode 100644 index 00000000..55fec72e --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/EndpointConfig.php @@ -0,0 +1,63 @@ + $endpoint) + { + if(in_array($regionId, $endpoint->getRegionIds())) + { + return self::findProductDomainByProduct($endpoint->getProductDomains(), $product); + } + } + return null; + } + + private static function findProductDomainByProduct($productDomains, $product) + { + if(null == $productDomains) + { + return null; + } + foreach ($productDomains as $key => $productDomain) + { + if($product == $productDomain->getProductName()) + { + return $productDomain->getDomainName(); + } + } + return null; + } + + + public static function getEndpoints() + { + return self::$endpoints; + } + + public static function setEndpoints($endpoints) + { + self::$endpoints = $endpoints; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/ProductDomain.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/ProductDomain.php new file mode 100644 index 00000000..b1f94f12 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/ProductDomain.php @@ -0,0 +1,28 @@ +productName = $product; + $this->domainName = $domain; + } + + public function getProductName() { + return $this->productName; + } + public function setProductName($productName) { + $this->productName = $productName; + } + public function getDomainName() { + return $this->domainName; + } + public function setDomainName($domainName) { + $this->domainName = $domainName; + } + +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/endpoints.xml b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/endpoints.xml new file mode 100644 index 00000000..a0c571a0 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/Regions/endpoints.xml @@ -0,0 +1,1358 @@ + + + + jp-fudao-1 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + me-east-1 + + Rdsrds.me-east-1.aliyuncs.com + Ecsecs.me-east-1.aliyuncs.com + Vpcvpc.me-east-1.aliyuncs.com + Kmskms.me-east-1.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.me-east-1.aliyuncs.com + + + + us-east-1 + + CScs.aliyuncs.com + Pushcloudpush.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + HPChpc.aliyuncs.com + Locationlocation.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Msgmsg-inner.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Bssbss.aliyuncs.com + Workorderworkorder.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ubsmsubsms.aliyuncs.com + Vpcvpc.aliyuncs.com + Alertalert.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Rdsrds.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + CFcf.aliyuncs.com + Drdsdrds.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Stssts.aliyuncs.com + Dtsdts.aliyuncs.com + Drcdrc.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Alidnsalidns.aliyuncs.com + Onsons.aliyuncs.com + Cdncdn.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + + + + ap-northeast-1 + + Rdsrds.ap-northeast-1.aliyuncs.com + Kmskms.ap-northeast-1.aliyuncs.com + Vpcvpc.ap-northeast-1.aliyuncs.com + Ecsecs.ap-northeast-1.aliyuncs.com + Cmsmetrics.ap-northeast-1.aliyuncs.com + Kvstorer-kvstore.ap-northeast-1.aliyuncs.com + Slbslb.ap-northeast-1.aliyuncs.com + + + + cn-hangzhou-bj-b01 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-hongkong + + Pushcloudpush.aliyuncs.com + COScos.aliyuncs.com + Onsons.aliyuncs.com + Essess.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + CScs.aliyuncs.com + Kmskms.cn-hongkong.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Drcdrc.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Dmdm.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + HPChpc.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Vpcvpc.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Bssbss.aliyuncs.com + Ubsmsubsms.aliyuncs.com + CloudAPIapigateway.cn-hongkong.aliyuncs.com + Stssts.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-hongkong.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Greengreen.aliyuncs.com + Aasaas.aliyuncs.com + Alidnsalidns.aliyuncs.com + Dtsdts.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Rdsrds.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Ossoss-cn-hongkong.aliyuncs.com + + + + cn-beijing-nu16-b01 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-beijing-am13-c01 + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + in-west-antgroup-1 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-guizhou-gov + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + in-west-antgroup-2 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-qingdao-cm9 + + CScs.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Drdsdrds.aliyuncs.com + HPChpc.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Alertalert.aliyuncs.com + Mscmsc-inner.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ubsmsubsms.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + AMSams.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Bssbss.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-qingdao.aliyuncs.com + CFcf.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Stssts.aliyuncs.com + Dtsdts.aliyuncs.com + Emremr.aliyuncs.com + Drcdrc.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + ROSros.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Rdsrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Cdncdn.aliyuncs.com + + + + tw-snowcloud-kaohsiung + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-shanghai-finance-1 + + Kmskms.cn-shanghai-finance-1.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + Rdsrds.aliyuncs.com + + + + cn-guizhou + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + cn-qingdao-finance + + Ossoss-cn-qdjbp-a.aliyuncs.com + + + + cn-beijing-gov-1 + + Ossoss-cn-haidian-a.aliyuncs.com + Rdsrds.aliyuncs.com + + + + cn-shanghai + + safsaf.cn-shanghai.aliyuncs.com + ARMSarms.cn-shanghai.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + HPChpc.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Drcdrc.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Drdsdrds.aliyuncs.com + CScs.aliyuncs.com + Kmskms.cn-shanghai.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Alertalert.aliyuncs.com + Mscmsc-inner.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.cn-shanghai.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.cn-shanghai.aliyuncs.com + Bssbss.aliyuncs.com + Omsoms.aliyuncs.com + Ubsmsubsms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Apigatewayapigateway.cn-shanghai.aliyuncs.com + CloudAPIapigateway.cn-shanghai.aliyuncs.com + Stssts.aliyuncs.com + Vpcvpc.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-shanghai.aliyuncs.com + Ddsmongodb.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Pushcloudpush.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + Dtsdts.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Jaqjaq.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + jaqjaq.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Rdsrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Essess.aliyuncs.com + Ossoss-cn-shanghai.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + vodvod.cn-shanghai.aliyuncs.com + + + + cn-shenzhen-inner + + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + Onsons.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + HPChpc.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + jaqjaq.aliyuncs.com + Mscmsc-inner.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Bssbss.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + Alertalert.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ubsmsubsms.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + AMSams.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Stssts.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-shenzhen.aliyuncs.com + CFcf.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Greengreen.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + CScs.aliyuncs.com + Drcdrc.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Dtsdts.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + ROSros.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Rdsrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + + + + cn-fujian + + Ecsecs-cn-hangzhou.aliyuncs.com + Rdsrds.aliyuncs.com + + + + in-mumbai-alipay + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + us-west-1 + + CScs.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Stssts.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + Pushcloudpush.aliyuncs.com + Alidnsalidns.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Bssbss.aliyuncs.com + Mscmsc-inner.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.us-west-1.aliyuncs.com + Alertalert.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Vpcvpc.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Ubsmsubsms.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.us-west-1.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + HPChpc.aliyuncs.com + Drcdrc.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Dtsdts.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + jaqjaq.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Onsons.aliyuncs.com + Ossoss-us-west-1.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + + + + cn-shanghai-inner + + CScs.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.aliyuncs.com + Smssms.aliyuncs.com + Drdsdrds.aliyuncs.com + HPChpc.aliyuncs.com + Locationlocation.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Msgmsg-inner.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + jaqjaq.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + Bssbss.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Alertalert.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Ubsmsubsms.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-shanghai.aliyuncs.com + CFcf.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Stssts.aliyuncs.com + Dtsdts.aliyuncs.com + Drcdrc.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Alidnsalidns.aliyuncs.com + Onsons.aliyuncs.com + Cdncdn.aliyuncs.com + + + + cn-anhui-gov-1 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-hangzhou-finance + + Ossoss-cn-hzjbp-b-console.aliyuncs.com + + + + cn-hangzhou + + ARMSarms.cn-hangzhou.aliyuncs.com + CScs.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Stssts.aliyuncs.com + Smssms.aliyuncs.com + Msgmsg-inner.aliyuncs.com + Jaqjaq.aliyuncs.com + Pushcloudpush.aliyuncs.com + Livelive.aliyuncs.com + Kmskms.cn-hangzhou.aliyuncs.com + Locationlocation.aliyuncs.com + Hpchpc.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Drcdrc.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.cn-hangzhou.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Vpcvpc.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + Domaindomain.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Ubsmsubsms.aliyuncs.com + Apigatewayapigateway.cn-hangzhou.aliyuncs.com + CloudAPIapigateway.cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-hangzhou.aliyuncs.com + Oascn-hangzhou.oas.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Alidnsalidns.aliyuncs.com + HPChpc.aliyuncs.com + Emremr.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + Dtsdts.aliyuncs.com + Bssbss.aliyuncs.com + Otsots-pop.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Rdsrds.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Onsons.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Dyvmsapidyvmsapi.aliyuncs.com + Dysmsapidysmsapi.aliyuncs.com + Dycdpapidycdpapi.aliyuncs.com + Dyiotapidyiotapi.aliyuncs.com + Dyplsapidyplsapi.aliyuncs.com + Dypnsapidypnsapi.aliyuncs.com + Snsuapisnsuapi.aliyuncs.com + + + + cn-beijing-inner + + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + HPChpc.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.aliyuncs.com + Smssms.aliyuncs.com + Drdsdrds.aliyuncs.com + CScs.aliyuncs.com + Locationlocation.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Msgmsg-inner.aliyuncs.com + Essess.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Bssbss.aliyuncs.com + Workorderworkorder.aliyuncs.com + Drcdrc.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Dmdm.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + Otsots-pop.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Ubsmsubsms.aliyuncs.com + Stssts.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-beijing.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + CFcf.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Greengreen.aliyuncs.com + Aasaas.aliyuncs.com + Alidnsalidns.aliyuncs.com + Pushcloudpush.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + Dtsdts.aliyuncs.com + Domaindomain.aliyuncs.com + ROSros.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Cdncdn.aliyuncs.com + + + + cn-haidian-cm12-c01 + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + Rdsrds.aliyuncs.com + + + + cn-anhui-gov + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + cn-shenzhen + + ARMSarms.cn-shenzhen.aliyuncs.com + CScs.aliyuncs.com + COScos.aliyuncs.com + Onsons.aliyuncs.com + Essess.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + Pushcloudpush.aliyuncs.com + Kmskms.cn-shenzhen.aliyuncs.com + Locationlocation.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Alertalert.aliyuncs.com + Drcdrc.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Iotiot.aliyuncs.com + HPChpc.aliyuncs.com + Bssbss.aliyuncs.com + Omsoms.aliyuncs.com + Ubsmsubsms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + BatchComputebatchcompute.cn-shenzhen.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Apigatewayapigateway.cn-shenzhen.aliyuncs.com + CloudAPIapigateway.cn-shenzhen.aliyuncs.com + Stssts.aliyuncs.com + Vpcvpc.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-shenzhen.aliyuncs.com + Oascn-shenzhen.oas.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Crmcrm-cn-hangzhou.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + Dtsdts.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + jaqjaq.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Greengreen.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Ossoss-cn-shenzhen.aliyuncs.com + + + + ap-southeast-2 + + Rdsrds.ap-southeast-2.aliyuncs.com + Kmskms.ap-southeast-2.aliyuncs.com + Vpcvpc.ap-southeast-2.aliyuncs.com + Ecsecs.ap-southeast-2.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.ap-southeast-2.aliyuncs.com + + + + cn-qingdao + + CScs.aliyuncs.com + COScos.aliyuncs.com + HPChpc.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.cn-qingdao.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + Dtsdts.aliyuncs.com + Locationlocation.aliyuncs.com + Essess.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + Drcdrc.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.cn-qingdao.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Dmdm.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Iotiot.aliyuncs.com + Bssbss.aliyuncs.com + Omsoms.aliyuncs.com + Ubsmsubsms.cn-qingdao.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + BatchComputebatchcompute.cn-qingdao.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Otsots-pop.aliyuncs.com + PTSpts.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Apigatewayapigateway.cn-qingdao.aliyuncs.com + CloudAPIapigateway.cn-qingdao.aliyuncs.com + Stssts.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-qingdao.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Greengreen.aliyuncs.com + Aasaas.aliyuncs.com + Alidnsalidns.aliyuncs.com + Pushcloudpush.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + Domaindomain.aliyuncs.com + ROSros.aliyuncs.com + jaqjaq.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Ossoss-cn-qingdao.aliyuncs.com + + + + cn-shenzhen-su18-b02 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-shenzhen-su18-b03 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + cn-shenzhen-su18-b01 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + ap-southeast-antgroup-1 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + oss-cn-bjzwy + + Ossoss-cn-bjzwy.aliyuncs.com + + + + cn-henan-am12001 + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + cn-beijing + + ARMSarms.cn-beijing.aliyuncs.com + CScs.aliyuncs.com + COScos.aliyuncs.com + Jaqjaq.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Stssts.aliyuncs.com + Smssms.aliyuncs.com + Msgmsg-inner.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + HPChpc.aliyuncs.com + Oascn-beijing.oas.aliyuncs.com + Locationlocation.aliyuncs.com + Onsons.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Hpchpc.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + jaqjaq.aliyuncs.com + Workorderworkorder.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Bssbss.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + Alertalert.aliyuncs.com + Omsoms.aliyuncs.com + Ubsmsubsms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Apigatewayapigateway.cn-beijing.aliyuncs.com + CloudAPIapigateway.cn-beijing.aliyuncs.com + Kmskms.cn-beijing.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.cn-beijing.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + Dtsdts.aliyuncs.com + Drcdrc.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Ossoss-cn-beijing.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + Rdsrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Alidnsalidns.aliyuncs.com + Greengreen.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Cdncdn.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + vodvod.cn-beijing.aliyuncs.com + + + + cn-hangzhou-d + + CScs.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Emremr.aliyuncs.com + Smssms.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Dtsdts.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Bssbss.aliyuncs.com + Mscmsc-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Alidnsalidns.aliyuncs.com + Iotiot.aliyuncs.com + HPChpc.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Alertalert.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + Otsots-pop.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Ubsmsubsms.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-hangzhou.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + CFcf.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Greengreen.aliyuncs.com + Aasaas.aliyuncs.com + Stssts.aliyuncs.com + Pushcloudpush.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + ROSros.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Drcdrc.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + + + + cn-gansu-am6 + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + Rdsrds.aliyuncs.com + + + + cn-ningxiazhongwei + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + cn-shanghai-et2-b01 + + CScs.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + Onsons.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Jaqjaq.aliyuncs.com + Dtsdts.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Bssbss.aliyuncs.com + Mscmsc-inner.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Dmdm.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + Ubsmsubsms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Ace-opsace-ops.cn-hangzhou.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + AMSams.aliyuncs.com + Otsots-pop.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Rdsrds.aliyuncs.com + Mtsmts.cn-hangzhou.aliyuncs.com + CFcf.aliyuncs.com + Acsacs.aliyun-inc.com + Httpdnshttpdns-api.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Stssts.aliyuncs.com + HPChpc.aliyuncs.com + Emremr.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.aliyuncs.com + Slbslb.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + Domaindomain.aliyuncs.com + ROSros.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Drdsdrds.aliyuncs.com + Vpc-innervpc-inner.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Greengreen.aliyuncs.com + Drcdrc.aliyuncs.com + Ossoss-cn-hangzhou.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + + + + cn-ningxia-am7-c01 + + Ecsecs-cn-hangzhou.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + cn-shenzhen-finance-1 + + Kmskms.cn-shenzhen-finance-1.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + Rdsrds.aliyuncs.com + Vpcvpc.aliyuncs.com + + + + ap-southeast-1 + + CScs.aliyuncs.com + Riskrisk-cn-hangzhou.aliyuncs.com + COScos.aliyuncs.com + Essess.aliyuncs.com + Billingbilling.aliyuncs.com + Dqsdqs.aliyuncs.com + Ddsmongodb.aliyuncs.com + Alidnsalidns.aliyuncs.com + Smssms.aliyuncs.com + Drdsdrds.aliyuncs.com + Dtsdts.aliyuncs.com + Kmskms.ap-southeast-1.aliyuncs.com + Locationlocation.aliyuncs.com + Msgmsg-inner.aliyuncs.com + ChargingServicechargingservice.aliyuncs.com + R-kvstorer-kvstore-cn-hangzhou.aliyuncs.com + Alertalert.aliyuncs.com + Mscmsc-inner.aliyuncs.com + HighDDosyd-highddos-cn-hangzhou.aliyuncs.com + Yundunyundun-cn-hangzhou.aliyuncs.com + Ubsms-innerubsms-inner.aliyuncs.com + Ocsm-kvstore.aliyuncs.com + Dmdm.aliyuncs.com + Greengreen.aliyuncs.com + Commondrivercommon.driver.aliyuncs.com + oceanbaseoceanbase.aliyuncs.com + Workorderworkorder.aliyuncs.com + Yundunhsmyundunhsm.aliyuncs.com + Iotiot.ap-southeast-1.aliyuncs.com + HPChpc.aliyuncs.com + jaqjaq.aliyuncs.com + Omsoms.aliyuncs.com + livelive.aliyuncs.com + Ecsecs-cn-hangzhou.aliyuncs.com + M-kvstorem-kvstore.aliyuncs.com + Vpcvpc.aliyuncs.com + BatchComputebatchCompute.aliyuncs.com + AMSams.aliyuncs.com + ROSros.aliyuncs.com + PTSpts.aliyuncs.com + Qualitycheckqualitycheck.aliyuncs.com + Bssbss.aliyuncs.com + Ubsmsubsms.aliyuncs.com + Apigatewayapigateway.ap-southeast-1.aliyuncs.com + CloudAPIapigateway.ap-southeast-1.aliyuncs.com + Stssts.aliyuncs.com + CmsSiteMonitorsitemonitor.aliyuncs.com + Aceace.cn-hangzhou.aliyuncs.com + Mtsmts.ap-southeast-1.aliyuncs.com + CFcf.aliyuncs.com + Crmcrm-cn-hangzhou.aliyuncs.com + Location-innerlocation-inner.aliyuncs.com + Aasaas.aliyuncs.com + Emremr.aliyuncs.com + Httpdnshttpdns-api.aliyuncs.com + Drcdrc.aliyuncs.com + Pushcloudpush.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.aliyuncs.com + YundunDdosinner-yundun-ddos.cn-hangzhou.aliyuncs.com + Domaindomain.aliyuncs.com + Otsots-pop.aliyuncs.com + Cdncdn.aliyuncs.com + Ramram.aliyuncs.com + Salessales.cn-hangzhou.aliyuncs.com + Rdsrds.aliyuncs.com + OssAdminoss-admin.aliyuncs.com + Onsons.aliyuncs.com + Ossoss-ap-southeast-1.aliyuncs.com + Dysmsapidysmsapi.ap-southeast-1.aliyuncs.com + + + + cn-shenzhen-st4-d01 + + Ecsecs-cn-hangzhou.aliyuncs.com + + + + eu-central-1 + + Rdsrds.eu-central-1.aliyuncs.com + Ecsecs.eu-central-1.aliyuncs.com + Vpcvpc.eu-central-1.aliyuncs.com + Kmskms.eu-central-1.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.eu-central-1.aliyuncs.com + + + + cn-zhangjiakou + + Rdsrds.cn-zhangjiakou.aliyuncs.com + Ecsecs.cn-zhangjiakou.aliyuncs.com + Vpcvpc.cn-zhangjiakou.aliyuncs.com + Cmsmetrics.cn-hangzhou.aliyuncs.com + Slbslb.cn-zhangjiakou.aliyuncs.com + + + diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RoaAcsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RoaAcsRequest.php new file mode 100644 index 00000000..037ad484 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RoaAcsRequest.php @@ -0,0 +1,207 @@ +setVersion($version); + $this->initialize(); + } + + private function initialize() + { + $this->setMethod("RAW"); + } + + public function composeUrl($iSigner, $credential, $domain) + { + $this->prepareHeader($iSigner); + + $signString = $this->getMethod().self::$headerSeparator; + if(isset($this->headers["Accept"])) + { + $signString = $signString.$this->headers["Accept"]; + } + $signString = $signString.self::$headerSeparator; + + if(isset($this->headers["Content-MD5"])) + { + $signString = $signString.$this->headers["Content-MD5"]; + } + $signString = $signString.self::$headerSeparator; + + if(isset($this->headers["Content-Type"])) + { + $signString = $signString.$this->headers["Content-Type"]; + } + $signString = $signString.self::$headerSeparator; + + if(isset($this->headers["Date"])) + { + $signString = $signString.$this->headers["Date"]; + } + $signString = $signString.self::$headerSeparator; + + $uri = $this->replaceOccupiedParameters(); + $signString = $signString.$this->buildCanonicalHeaders(); + $queryString = $this->buildQueryString($uri); + $signString .= $queryString; + $this->headers["Authorization"] = "acs ".$credential->getAccessKeyId().":" + .$iSigner->signString($signString, $credential->getAccessSecret()); + $requestUrl = $this->getProtocol()."://".$domain.$queryString; + return $requestUrl; + } + + private function prepareHeader($iSigner) + { + $this->headers["Date"] = gmdate($this->dateTimeFormat); + if(null == $this->acceptFormat) + { + $this->acceptFormat = "RAW"; + } + $this->headers["Accept"] = $this->formatToAccept($this->getAcceptFormat()); + $this->headers["x-acs-signature-method"] = $iSigner->getSignatureMethod(); + $this->headers["x-acs-signature-version"] = $iSigner->getSignatureVersion(); + $this->headers["x-acs-region-id"] = $this->regionId; + $content = $this->getDomainParameter(); + if ($content != null) { + $this->headers["Content-MD5"] = base64_encode(md5(json_encode($content),true)); + } + $this->headers["Content-Type"] = "application/octet-stream;charset=utf-8"; + } + + private function replaceOccupiedParameters() + { + $result = $this->uriPattern; + foreach ($this->pathParameters as $pathParameterKey => $apiParameterValue) + { + $target = "[".$pathParameterKey."]"; + $result = str_replace($target,$apiParameterValue,$result); + } + return $result; + } + + private function buildCanonicalHeaders() + { + $sortMap = array(); + foreach ($this->headers as $headerKey => $headerValue) + { + $key = strtolower($headerKey); + if(strpos($key, "x-acs-") === 0) + { + $sortMap[$key] = $headerValue; + } + } + ksort($sortMap); + $headerString = ""; + foreach ($sortMap as $sortMapKey => $sortMapValue) + { + $headerString = $headerString.$sortMapKey.":".$sortMapValue.self::$headerSeparator; + } + return $headerString; + } + + private function splitSubResource($uri) + { + $queIndex = strpos($uri, "?"); + $uriParts = array(); + if(null != $queIndex) + { + array_push($uriParts, substr($uri,0,$queIndex)); + array_push($uriParts, substr($uri,$queIndex+1)); + } + else + { + array_push($uriParts,$uri); + } + return $uriParts; + } + + private function buildQueryString($uri) + { + $uriParts = $this->splitSubResource($uri); + $sortMap = $this->queryParameters; + if(isset($uriParts[1])) + { + $sortMap[$uriParts[1]] = null; + } + $queryString = $uriParts[0]; + if(count($uriParts)) + { + $queryString = $queryString."?"; + } + ksort($sortMap); + foreach ($sortMap as $sortMapKey => $sortMapValue) + { + $queryString = $queryString.$sortMapKey; + if(isset($sortMapValue)) + { + $queryString = $queryString."=".$sortMapValue; + } + $queryString = $queryString.$querySeprator; + } + if(null==count($sortMap)) + { + $queryString = substr($queryString, 0, strlen($queryString)-1); + } + return $queryString; + } + + private function formatToAccept($acceptFormat) + { + if($acceptFormat == "JSON") + { + return "application/json"; + } + elseif ($acceptFormat == "XML") { + return "application/xml"; + } + return "application/octet-stream"; + } + + public function getPathParameters() + { + return $this->pathParameters; + } + + public function putPathParameter($name, $value) + { + $this->pathParameters[$name] = $value; + } + + public function getDomainParameter() + { + return $this->domainParameters; + } + + public function putDomainParameters($name, $value) + { + $this->domainParameters[$name] = $value; + } + + public function getUriPattern() + { + return $this->uriPattern; + } + + public function setUriPattern($uriPattern) + { + return $this->uriPattern = $uriPattern; + } + + public function setVersion($version) + { + $this->version = $version; + $this->headers["x-acs-version"] = $version; + } +} \ No newline at end of file diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RpcAcsRequest.php b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RpcAcsRequest.php new file mode 100644 index 00000000..164acd34 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/lib/Core/RpcAcsRequest.php @@ -0,0 +1,105 @@ +initialize(); + } + + private function initialize() + { + $this->setMethod("GET"); + $this->setAcceptFormat("JSON"); + } + + + private function prepareValue($value) + { + if (is_bool($value)) { + if ($value) { + return "true"; + } else { + return "false"; + } + } else { + return $value; + } + } + + public function composeUrl($iSigner, $credential, $domain) + { + $apiParams = parent::getQueryParameters(); + foreach ($apiParams as $key => $value) { + $apiParams[$key] = $this->prepareValue($value); + } + $apiParams["RegionId"] = $this->getRegionId(); + $apiParams["AccessKeyId"] = $credential->getAccessKeyId(); + $apiParams["Format"] = $this->getAcceptFormat(); + $apiParams["SignatureMethod"] = $iSigner->getSignatureMethod(); + $apiParams["SignatureVersion"] = $iSigner->getSignatureVersion(); + $apiParams["SignatureNonce"] = md5(uniqid(mt_rand(), true)); + $apiParams["Timestamp"] = gmdate($this->dateTimeFormat); + $apiParams["Action"] = $this->getActionName(); + $apiParams["Version"] = $this->getVersion(); + $apiParams["Signature"] = $this->computeSignature($apiParams, $credential->getAccessSecret(), $iSigner); + if(parent::getMethod() == "POST") { + + $requestUrl = $this->getProtocol()."://". $domain . "/"; + foreach ($apiParams as $apiParamKey => $apiParamValue) + { + $this->putDomainParameters($apiParamKey,$apiParamValue); + } + return $requestUrl; + } + else { + $requestUrl = $this->getProtocol()."://". $domain . "/?"; + + foreach ($apiParams as $apiParamKey => $apiParamValue) + { + $requestUrl .= "$apiParamKey=" . urlencode($apiParamValue) . "&"; + } + return substr($requestUrl, 0, -1); + } + } + + private function computeSignature($parameters, $accessKeySecret, $iSigner) + { + ksort($parameters); + $canonicalizedQueryString = ''; + foreach($parameters as $key => $value) + { + $canonicalizedQueryString .= '&' . $this->percentEncode($key). '=' . $this->percentEncode($value); + } + $stringToSign = parent::getMethod().'&%2F&' . $this->percentencode(substr($canonicalizedQueryString, 1)); + $signature = $iSigner->signString($stringToSign, $accessKeySecret."&"); + + return $signature; + } + + protected function percentEncode($str) + { + $res = urlencode($str); + $res = preg_replace('/\+/', '%20', $res); + $res = preg_replace('/\*/', '%2A', $res); + $res = preg_replace('/%7E/', '~', $res); + return $res; + } + + public function getDomainParameter() + { + return $this->domainParameters; + } + + public function putDomainParameters($name, $value) + { + $this->domainParameters[$name] = $value; + } + +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/autoload.php b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/autoload.php new file mode 100644 index 00000000..911f28b0 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/LICENSE b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_classmap.php b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..7a91153b --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($baseDir . '/lib'), +); diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_real.php b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_real.php new file mode 100644 index 00000000..c6fc3ca3 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_real.php @@ -0,0 +1,52 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInitee70723fd3132b6d05f0ff016c58b71b::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_static.php b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_static.php new file mode 100644 index 00000000..3ccb7383 --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/autoload_static.php @@ -0,0 +1,31 @@ + + array ( + 'Aliyun\\' => 7, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Aliyun\\' => + array ( + 0 => __DIR__ . '/../..' . '/lib', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitee70723fd3132b6d05f0ff016c58b71b::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitee70723fd3132b6d05f0ff016c58b71b::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/installed.json b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/installed.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/lib/aliyun-dysms-php-sdk/api_sdk/vendor/composer/installed.json @@ -0,0 +1 @@ +[] diff --git a/lib/smsapi-aliyun.inc.php b/lib/smsapi-aliyun.inc.php new file mode 100644 index 00000000..ec98d475 --- /dev/null +++ b/lib/smsapi-aliyun.inc.php @@ -0,0 +1,41 @@ +