This is a wrapper library for the ClouDNS API to be used by PHP applications. It tries to ease the integration of the API into your applications by handling all interactions with API and providing a simple interface to interact with. The entire projects source code is posted on gitlab.

To begin using the Library, the cloudns.php must be included in your application.

require_once('/path/to/library/cloudns.php');

An instance of the ClouDNS must be created to interact with the library. This Object is the gateway to all interactions with the library. The API password obtained from the ClouDNS must be passed into the ClouDNS by calling set_options.

$cloudns = new ClouDNS();
$cloudns->set_options(array('auth-id' => '999','auth-password' => 'some_password'));

Functions

Function Description
detect_ip() Determine our IP address
list_name_servers() Get a list with available domain name servers.
list_zones(page,rows,search[optional]) Gets a paginated list with zones you have or zone names matching a keyword.
list_zone_stats() Gets the number of the zones you have and the zone limit of your customer plan. Reverse zones are included.
delete_domain_zone(domain) This function is available only for slave zones, master zones and cloud/bulk domains. Works with reverse zones too.

Examples

Numerous examples have been provided in the repository’s examples folder. The examples demonstrate how to accomplish most actions possible in the library. You are encouraged to look at these examples to learn the best practices for using the library.