a1extran / dns-made-easy
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (1.1.1) of this package.
PHP wrapper for the Dns Made Easy API.
1.1.1
2015-03-07 17:16 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2020-10-02 18:23:22 UTC
README
Example Usage
Create an instance of the DnsMadeEasy class
// log into your DNS Made Easy account to generate/obtain your API key and secret key. // specify TRUE for the last parameter if you want to make test API calls. $dme = new DnsMadeEasy('yourApiKey', 'yourSecretKey', TRUE);
Adding a domain
$result = $dme->domains->add('foobar.com'); if ($errors = $result->errors()) { print_r($errors); } else { // outputs the raw results print_r($result->rawBody()); // grab the JSON decoded results. // use TRUE to return an associative array, FALSE to return an object. $domain = $result->body(FALSE); // output the name servers associated with this domain. print_r($domain->nameServer); }
Adding a DNS record
$record = array( 'name' => '', 'type' => 'A', 'data' => '2.4.8.16', 'ttl' => 1800, ); $result = $dme->records->add('foobar.com', $record); if ($errors = $result->errors()) { print_r($errors); } else { // grab the JSON decoded results. // use TRUE to return an associative array, FALSE to return an object. $record = $result->body(FALSE); // output the assigned record ID print_r($record->id); }