justim / neostrada-api-client
There is no license information available for the latest version (0.1.0) of this package.
API client for DNS/hosting provider Neostrada
0.1.0
2015-03-06 13:34 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-12-05 05:02:33 UTC
README
API client for DNS/hosting provider Neostrada
Requirements
PHP >= 5.4
Installation
- Add
justim/neostrada-api-client
to yourcomposer.json
composer install justim/neostrada-api-client
Usage
$neostrada = new Neostrada($apiKey, $secret); $domain = $neostrada->domain('example.com'); // set A-record for www to 127.0.0.1 $domain->a('www', '127.0.0.1'); // you can do the same for CNAME-records $domain->cname('autodiscover', 'autodiscover.outlook.com'); // alternatively you can get an instance of a record and make your changes there $a = $domain->a('www'); $a->content = '10.0.0.2'; $a->ttl = 1800; // making changes to current records doesn't automatically save changes $domain->save(); $mxRecords = $domain->mx(); // lists all MX-records foreach ($mxRecords as $mx) { // change the content of the record $mx->content = 'mail.google.com'; // mark the records as deleted $mx->setDeleted(); } $mxRecords->save(); // adding records can be done by a new record and adding it $a = $domain->create('a'); $a->name = 'mail'; $a->content = '127.0.0.1'; $domain->add($a); // adding a record saves it immediately // fetching the auth code $authCode = $domain->authCode();
List of possible API calls
- getnameserver
- getdns
- dns
- adddns
- gettoken
- extensions
- whois
- holder
- deleteholder
- getholders
- register
- nameserver