PHPackages                             artroot/kohana-pdns-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. artroot/kohana-pdns-module

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

artroot/kohana-pdns-module
==========================

Module helps to work with Power DNS (push/rm zones &amp; records)

08PHP

Since Jun 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/artroot/kohana-pdns-module)[ Packagist](https://packagist.org/packages/artroot/kohana-pdns-module)[ RSS](/packages/artroot-kohana-pdns-module/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Kohana-PDNS-module
==================

[](#kohana-pdns-module)

Work with Power DNS zones(domains) &amp; records

Installation
------------

[](#installation)

### With composer

[](#with-composer)

```
composer require artroot/kohana-pdns-module
```

### With git

[](#with-git)

```
git clone https://github.com/artroot/kohana-pdns-module
```

or download

```
wget https://github.com/artroot/kohana-pdns-module/archive/master.zip
```

Regular Setup
-------------

[](#regular-setup)

Add new module, copy to your bootstrap.php in Kohana::modules array

```
Kohana::modules(array(
    ...
	'pdns'  => MODPATH.'pdns',  // Work with Power DNS
));
```

Configure your Database.php, add new group for Power DNS

```
...
'pdns' => array
    (
        'type'       => 'mysqli',
        'connection' => array(
            'hostname'   => 'localhost',
            'database'   => 'PdnsDbName',
            'username'   => 'username',
            'password'   => 'password',
            'persistent' => FALSE,
        ),
        'table_prefix' => '',
        'charset'      => 'utf8',
        'caching'      => FALSE,
        'profiling'    => TRUE,
    ),
```

Put the pdns folder into MODPATH

Code
----

[](#code)

### Synchronize method

[](#synchronize-method)

```
$hosts = [
    '192.168.1.101' => 'host1',
    '192.168.1.102' => 'host2',
    '192.168.2.103' => 'host3',
];
$fwdZoneOptions = [
    'name' => 'local',
    'type' => Model_Domain::MASTER,
];
$revZoneOptions = [
    'type' => Model_Domain::MASTER,
];
$recordTypes = [
    Model_Record::A,
    Model_Record::PTR,
];
PDNS::synchronize($hosts, $fwdZoneOptions, $revZoneOptions, $recordTypes);
```

Will fill tables:

#### Domains table

[](#domains-table)

idnametype1localMASTER21.168.192.in-addr.arpaMASTER32.168.192.in-addr.arpaMASTER#### Records table

[](#records-table)

iddomain\_idnametypecontentttl11localSOAns.local. local 2017064352 10800 3600 604800 86400360021localNSns.local3600321.168.192.in-addr.arpaSOAns.local. 1.168.192.in-addr.arpa 2017064352 10800 3600 604800 864003600421.168.192.in-addr.arpaNSns.local360051host1A192.168.1.101360062101.1.168.192.in-addr.arpaPTRhost1.local360071host2A192.168.1.102360082102.1.168.192.in-addr.arpaPTRhost2.local3600932.168.192.in-addr.arpaSOAns.local. 2.168.192.in-addr.arpa 2017064352 10800 3600 604800 8640036001032.168.192.in-addr.arpaNSns.local3600111host3A192.168.2.1033600123103.2.168.192.in-addr.arpaPTRhost3.local3600Do callback if you need to change one of the records. For Example:

```
$oldHost = [
    '192.168.1.102' => 'host2',
];
$newHost = [
    '192.168.1.102' => 'host5',
];

PDNS::synchronize($newHost, $fwdZoneOptions, $revZoneOptions, $recordTypes, PDNS::CALL_RM_REC, [
    $oldHost
]);
```

Or use rmRecord() once

### RmRecord method

[](#rmrecord-method)

```
$hosts = [
    '192.168.1.102' => 'host2',
    '192.168.1.103' => 'host3',
];
$recordTypes = [
    Model_Record::A,
    Model_Record::PTR,
];
$zoneName = 'local';
PDNS::rmRecord($hosts, $recordTypes, $zoneName);
```

Delete all records for hosts list.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11537237?v=4)[Artem Semenishch](/maintainers/artroot)[@artroot](https://github.com/artroot)

---

Top Contributors

[![artroot](https://avatars.githubusercontent.com/u/11537237?v=4)](https://github.com/artroot "artroot (8 commits)")

### Embed Badge

![Health badge](/badges/artroot-kohana-pdns-module/health.svg)

```
[![Health](https://phpackages.com/badges/artroot-kohana-pdns-module/health.svg)](https://phpackages.com/packages/artroot-kohana-pdns-module)
```

###  Alternatives

[sybrew/the-seo-framework-extension-manager

A WordPress plugin that allows you to manage extensions for The SEO Framework.

8792.7k](/packages/sybrew-the-seo-framework-extension-manager)[bitwasp/bech32

Pure (no dependencies) implementation of bech32

12773.9k53](/packages/bitwasp-bech32)[cslant/laravel-like

A package providing 👍 like, 👎 dislike and love ❤️ or unlike ✋features features for Laravel applications.

2323.7k1](/packages/cslant-laravel-like)[shish/microhtml

A minimal HTML generating library

1146.2k3](/packages/shish-microhtml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
