This is a smart DNS Cloudxns.net official launch of a CloudXNS system API PHP SDK package, PHP SDK package than the simultaneous release of the Python SDK is more complete, including a full HTML demo, can achieve all the analytic management operations , users can directly manage their domain DNS resolution.
cloudxns-api-sdk-php Instructions for use
1 Environment Release Requirements
PHP >= 5.4.0
Dependent Guzzlehttp version 5.3
2 Installation Steps
2.1 Installing Composer If you have not installed Composer, you can install it through getcomposer.org.
2.2 Installation Run Cloudxns API SDK sample
2.2.1 Download the SDK source code and install
You can download the zip package from Cloudxns-api-sdk-php.zip and perform the following command after decompression:
Composer Install
2.2.2 Modifying API KEY
Modify the PHP file under the Demo folder or the API KEY in the demo.php file in the HTML directory:
$api->setapikey (' xxxxxxxxxx ');//modify to your own API Key $api->setsecretkey (' xxxxxxxxxx ');//Modify to your own Seceret key
2.2.3 Executing PHP files under demo or accessing HTML files under HTML
2.3 Using the Cloudxns API SDK in projects
2.3.1 using composer installation source files
Switch to the directory where you want to store the SDK source code, and execute the following command:
Composer require "cloudxns/cloud-xns-api-sdk-php:*" composer require "Guzzlehttp/guzzle: ~5.0"
Use the SDK example in the 2.3.2 program for more details on the demo folder
Require_once './vendor/autoload.php ';//For reference only, depending on the path in the project $api = new Cloudxnsapi (); $api->setapikey (' xxxxxxxxxx ');//modify into your own API Key $api->setsecretkey (' xxxxxxxxxx ');//Modify to your own Seceret key//Get the domain Name list $ Api->domain->domainlist (); Add domain name $arr = Array ("Domain" = "cloudxns.net"); $api->domain->domainadd ($arr); Delete the domain name $api->domain->domaindelete (' 5568 ');
Download Cloudxns API PHP SDK address please click here