这是一款智能DNSCloudXNS.net 官方推出一个款CloudXNS系统API的PHPSDK包,PHP的SDK包比同时发布的PythonSDK更为完善,其中还包含了一个完整的HTMLdemo,可以实现所有解析的管理操作,使用者直接可以拿来管理自己的域名DNS解析。
PHP>=5.4.0InstallIfyoudonothave Composer,youmayinstallitbyfollowingtheinstructionsat getcomposer.org.
InstallFirstExtractthearchivefiledownloadedfrom CloudXNS-API-SDK-PHP.zip toyourproject.Youcantheninstallusingthefollowingcommand:
composer installInstallSecondyoucantheninstallusingthefollowingcommand:
composer require "cloudxns/cloud-xns-api-sdk-php:*" cd vendor/cloudxns/cloud-xns-api-sdk-php/composer require "hightman/httpclient:*"Demouse Cloudxns\Api; $api = new Api(); $api->setApiKey('xxxxx'); $api->setSecretKey('xxxx'); //获取域名列表 $api->domain->domainList(); //添加域名 $arr = array("domain"=>"cloudxns.net"); $api->domain->domainAdd($arr); //删除域名 $api->domain->domainDelete('/5568');
评论