PHPackages                             danwats/harvesterphp - 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. danwats/harvesterphp

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

danwats/harvesterphp
====================

DNS harvester to gather DNS records

v1.2.1(8mo ago)03[1 issues](https://github.com/danwats/HarvesterPHP/issues)[1 PRs](https://github.com/danwats/HarvesterPHP/pulls)MITPHPCI passing

Since Oct 15Pushed 4mo agoCompare

[ Source](https://github.com/danwats/HarvesterPHP)[ Packagist](https://packagist.org/packages/danwats/harvesterphp)[ RSS](/packages/danwats-harvesterphp/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (2)Versions (13)Used By (0)

DNS Harvester
=============

[](#dns-harvester)

[![HarvesterPHP DNS Record Scanner](assets/banner.png)](assets/banner.png)

This package allows you to gather DNS records from apex domains and predefined hostnames that can be manually defined.

- [**Installation**](#installation)
- [**Usage**](#usage)
    - [predefined records with pretty json](#predefined-record-with-pretty-json)
    - [with progress bar](#with-progress-bar)
    - [define own records to scan](#define-own-records-to-scan)
    - [print to bind format](#print-to-bind-format)

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

[](#installation)

Install HarvesterPHP in your app with Composer:

```
composer require danwats/harvesterphp

```

Usage
-----

[](#usage)

### predefined records with pretty json

[](#predefined-records-with-pretty-json)

With predefined hostnames e.g. apex, www, etc. with pretty JSON

```
use DNS\Harvester\RecordList;
use DNS\Harvester\DNS;

$recordList = new RecordList();
// Will run use predefined hostnames
$recordList->loadDefaults();

$dns = new DNS("google.com", $recordList);
$dns->harvest();
echo $dns->json(JSON_PRETTY_PRINT);
```

### with progress bar

[](#with-progress-bar)

If you want to show progress:

```
use DNS\Harvester\RecordList;
use DNS\Harvester\DNS;

$recordList = new RecordList();
$recordList->loadDefaults();

// Show Progress
$dns = new DNS("google.com", $recordList, true);
$dns->harvest();
echo $dns->json();
```

### define own records to scan

[](#define-own-records-to-scan)

You don't have to use predefined hosts, you can add your own

```
use DNS\Harvester\RecordList;
use DNS\Harvester\RecordType;
use DNS\Harvester\Record;
use DNS\Harvester\DNS;

$recordList = new RecordList();
// add new hostname and what resource record to use, exclude loadDefaults()
$recordList->add(new Record('www', [RecordType::A, RecordType::AAAA, RecordType::CNAME, RecordType::TXT, RecordType::MX]));
$recordList->add(new Record('custom', [RecordType::A, RecordType::AAAA, RecordType::CNAME, RecordType::TXT, RecordType::MX]));

$dns = new DNS("google.com", $recordList, true);
$dns->harvest();
echo $dns->json();
```

### print to bind format

[](#print-to-bind-format)

```
use DNS\Harvester\RecordList;
use DNS\Harvester\DNS;

$recordList = new RecordList();
$recordList->loadDefaults();

$dns = new DNS("google.com", $recordList);
$dns->harvest();
// with TTLs
echo $dns->bind();
// without TTLs
echo $dns->bind(false);
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance69

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9e3a5a0a2e0d58796e29527408f863066e5c1713afed7b09a8bafa5decfd6b2?d=identicon)[dan.wat](/maintainers/dan.wat)

---

Top Contributors

[![danwats](https://avatars.githubusercontent.com/u/21339911?v=4)](https://github.com/danwats "danwats (37 commits)")

---

Tags

dnsscannerHarvesterrecon

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/danwats-harvesterphp/health.svg)

```
[![Health](https://phpackages.com/badges/danwats-harvesterphp/health.svg)](https://phpackages.com/packages/danwats-harvesterphp)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

5186.0k18](/packages/phel-lang-phel-lang)[dagger/dagger

Dagger PHP SDK

261.1k](/packages/dagger-dagger)

PHPackages © 2026

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