A PHP client to communicate with the PowerDNS API.
Via Composer
$ composer require exonet/powerdns-php
Basic example how to create a new DNS zone and insert a few DNS records.
use Exonet\Powerdns\Powerdns;
use Exonet\Powerdns\RecordType;
// Initialize the Powerdns client.
$powerdns = new Powerdns('127.0.0.1', 'powerdns_secret_string');
// Create a new zone.
$zone = $powerdns->createZone(
'example.com',
['ns1.example.com.', 'ns2.example.']
);
// Add two DNS records to the zone.
$zone->create([
['type' => RecordType::A, 'content' => '127.0.0.1', 'ttl' => 60, 'name' => '@'],
['type' => RecordType::A, 'content' => '127.0.0.1', 'ttl' => 60, 'name' => 'www'],
]);
See the examples directory for more.
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email development@exonet.nl instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.