PHPackages                             exonet/powerdns-php - 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. [API Development](/categories/api)
4. /
5. exonet/powerdns-php

ActiveLibrary[API Development](/categories/api)

exonet/powerdns-php
===================

PowerDNS API PHP Client

v5.0.0(1w ago)106304.3k—8.4%34[1 issues](https://github.com/exonet/powerdns-php/issues)2MITPHPPHP ^8.2CI passing

Since Mar 12Pushed 4d ago10 watchersCompare

[ Source](https://github.com/exonet/powerdns-php)[ Packagist](https://packagist.org/packages/exonet/powerdns-php)[ Docs](https://github.com/exonet/powerdns-php)[ RSS](/packages/exonet-powerdns-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (42)Used By (2)

[![Latest Version on Packagist](https://camo.githubusercontent.com/83c8cd5f07dbd085f13b7525afaf5559f2f57d04ca7582e7504c3d5ab214919e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65786f6e65742f706f776572646e732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/exonet/powerdns-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/01d85e4811784964555e4580855327e6446fea98d3d7fcbcf683b73b3ae06538/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f65786f6e65742f706f776572646e732d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://app.travis-ci.com/github/exonet/powerdns-php)[![Total Downloads](https://camo.githubusercontent.com/cf1913ac9ebb9742498b6b4699e3f400f61cfb64c17d6bd52841218608eb49de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65786f6e65742f706f776572646e732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/exonet/powerdns-php)

powerdns-php
============

[](#powerdns-php)

A PHP client to communicate with the PowerDNS API.

Install
-------

[](#install)

Via Composer

```
$ composer require exonet/powerdns-php
```

Usage
-----

[](#usage)

Basic example how to create a new DNS zone and insert a few DNS records.

```
use Exonet\Powerdns\Powerdns;
use Exonet\Powerdns\RecordType;
use Exonet\Powerdns\Resources\ResourceRecord;
use Exonet\Powerdns\Resources\Record;

// 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.com.']
);

// 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'],
]);

// OR use the Object-based way
$zone->create([
    (new ResourceRecord())->setType(RecordType::A)->setRecord('127.0.0.1')->setName('@')->setTtl(60),
    (new ResourceRecord())->setType(RecordType::A)->setRecord((new Record())->setContent('127.0.0.1'))->setName('@')->setTtl(60),
]);
```

See the [examples](examples) directory for more.

Change log
----------

[](#change-log)

Please see [releases](https://github.com/exonet/powerdns-php/releases) for more information on what has changed recently.

Testing
-------

[](#testing)

Testing against multiple PHP / PowerDNS versions can be done by using the provided `docker-compose.yml` and the `run-tests.sh` shell script:

```
$ docker-compose up -d
$ ./run-tests.sh
```

After running `docker-compose up -d` wait a few seconds so PowerDNS can be initialized. You can leave the containers running and call the test script multiple times.

To test against a specific PHP / PowerDNS combination, you can provide the PHP version as first and the PowerDNS version as second parameter:

```
$ ./run-tests.sh 8.2 4.3
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](.github/CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Exonet](https://github.com/exonet)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance99

Actively maintained with recent releases

Popularity52

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~183 days

Total

39

Last Release

10d ago

Major Versions

v0.2.4 → v1.0.02019-07-04

v1.1.0 → v2.0.02020-01-29

v2.6.0 → v3.0.02021-01-05

v3.4.0 → v4.0.02021-12-20

v4.7.1 → v5.0.02026-06-23

PHP version history (4 changes)v0.2.1PHP ~7.1

v2.6.0PHP &gt;=7.1

v3.0.0PHP ^7.3|^8.0

v5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c233226e0fbf5dd5e3f42f3e1b832a51a825d08ca0d9e58abaf10c29740a9ba?d=identicon)[exonet](/maintainers/exonet)

---

Top Contributors

[![trizz](https://avatars.githubusercontent.com/u/832056?v=4)](https://github.com/trizz "trizz (204 commits)")[![robbinjanssen](https://avatars.githubusercontent.com/u/120077?v=4)](https://github.com/robbinjanssen "robbinjanssen (101 commits)")[![styxit](https://avatars.githubusercontent.com/u/1370548?v=4)](https://github.com/styxit "styxit (31 commits)")[![bennetgallein](https://avatars.githubusercontent.com/u/15325891?v=4)](https://github.com/bennetgallein "bennetgallein (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![rsplithof](https://avatars.githubusercontent.com/u/805008?v=4)](https://github.com/rsplithof "rsplithof (7 commits)")[![akondas](https://avatars.githubusercontent.com/u/8239917?v=4)](https://github.com/akondas "akondas (4 commits)")[![jeroenvermeulen](https://avatars.githubusercontent.com/u/658024?v=4)](https://github.com/jeroenvermeulen "jeroenvermeulen (3 commits)")[![robinmulder](https://avatars.githubusercontent.com/u/120075?v=4)](https://github.com/robinmulder "robinmulder (3 commits)")[![mvdgeijn](https://avatars.githubusercontent.com/u/50988060?v=4)](https://github.com/mvdgeijn "mvdgeijn (3 commits)")[![Brianvanwessel](https://avatars.githubusercontent.com/u/31928901?v=4)](https://github.com/Brianvanwessel "Brianvanwessel (3 commits)")[![frankvanhest](https://avatars.githubusercontent.com/u/2206481?v=4)](https://github.com/frankvanhest "frankvanhest (2 commits)")[![hknet](https://avatars.githubusercontent.com/u/4014716?v=4)](https://github.com/hknet "hknet (2 commits)")[![jackdpeterson](https://avatars.githubusercontent.com/u/938961?v=4)](https://github.com/jackdpeterson "jackdpeterson (2 commits)")[![Sn0wCrack](https://avatars.githubusercontent.com/u/442287?v=4)](https://github.com/Sn0wCrack "Sn0wCrack (2 commits)")[![exonet-release-drafter-public[bot]](https://avatars.githubusercontent.com/in/4122729?v=4)](https://github.com/exonet-release-drafter-public[bot] "exonet-release-drafter-public[bot] (1 commits)")[![SurajDadral](https://avatars.githubusercontent.com/u/40318315?v=4)](https://github.com/SurajDadral "SurajDadral (1 commits)")[![Th3Mouk](https://avatars.githubusercontent.com/u/5006899?v=4)](https://github.com/Th3Mouk "Th3Mouk (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

dnspdnsphpphp-librarypowerdnspowerdns-apipowerdnsexonetpowerdns-phppowerdns-api

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/exonet-powerdns-php/health.svg)

```
[![Health](https://phpackages.com/badges/exonet-powerdns-php/health.svg)](https://phpackages.com/packages/exonet-powerdns-php)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

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