PHPackages                             gurkanbicer/getdns - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. gurkanbicer/getdns

ActiveProject[Parsing &amp; Serialization](/categories/parsing)

gurkanbicer/getdns
==================

GetDNS is a parser for dig command results.

v1.1.0(1y ago)09PHPPHP &gt;=8.2

Since Sep 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gurkanbicer/getdns)[ Packagist](https://packagist.org/packages/gurkanbicer/getdns)[ RSS](/packages/gurkanbicer-getdns/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

[!["GetDNS"](https://camo.githubusercontent.com/d75b9b02ffc07e75577dfa55d69e8a85f3fd926c4b5729096881e787d2f1e099/68747470733a2f2f7777772e676574646e732e636f6d2e74722f696d616765732f676574646e732d6c6f676f2d6461726b2e737667)](https://www.getdns.com.tr)

GetDNS
======

[](#getdns)

GetDNS is a parser for the `dig` command results. This package includes features for querying DNS records by using random public dns servers and for querying domain nameservers.

Example usage:

```
use Gurkanbicer\Getdns\Getdns;
use Gurkanbicer\Getdns\Exceptions\EmptyResponseException;
use Gurkanbicer\Getdns\Exceptions\InvalidDomainException;
use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Exception\ProcessFailedException;

$getdns = new Getdns();

try {
    $getdns->setDomain("grkn.co");
    $aRecords = $getdns->queryDns("A");
    var_dump($aRecords);

    $domainNameservers = $getdns->queryDomainNameservers();
    var_dump($domainNameservers);
} catch (ProcessFailedException) {
    echo "The process has been failed.";
} catch (ProcessTimedOutException) {
    echo "The process has been timed out.";
}

```

Example output:

```
array(5) {
  ["status"]=>
  string(7) "NOERROR"
  ["data"]=>
  array(2) {
    [0]=>
    string(12) "188.114.97.3"
    [1]=>
    string(12) "188.114.96.3"
  }
  ["query"]=>
  string(1) "A"
  ["nameserver"]=>
  string(7) "9.9.9.9"
  ["command"]=>
  string(65) "dig +nocmd +noall +multiline +answer +comments grkn.co A @9.9.9.9"
}

```

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

[](#installation)

You can install it via Composer: `composer require gurkanbicer/getdns`

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0.2
- The **dig command** should be run on your server, otherwise you should install the package (for installation: )
- Your php environment shouldn't be disable proc\_open function and other functions that starts with proc\_\*

Supported DNS Types
-------------------

[](#supported-dns-types)

- NS
- SOA
- A
- AAAA
- CNAME
- MX
- TXT
- SRV
- Actual domain nameservers (that the onwer pointed)

Donations
---------

[](#donations)

If you wanna support me you can

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/gurkanbicer)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~0 days

Total

3

Last Release

613d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0.2

v1.1.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/599676a890b52bd162fe19ea10933cfc850651ef7ef5fb92aeedc6c157af2d80?d=identicon)[gurkanbicer](/maintainers/gurkanbicer)

---

Top Contributors

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

---

Tags

dnsdigdns lookupgetdns

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gurkanbicer-getdns/health.svg)

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

###  Alternatives

[justinwalsh/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

4.6k38.1k1](/packages/justinwalsh-dauxio)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[couscous/couscous

Documentation website generator

84167.6k24](/packages/couscous-couscous)[protobuf-php/protobuf-plugin

PHP Code generator plugin from Google's Protocol Buffers

57141.6k17](/packages/protobuf-php-protobuf-plugin)[estahn/json-query-wrapper

Wrapper for jq, a lightweight and flexible command-line JSON processor

1548.7k1](/packages/estahn-json-query-wrapper)

PHPackages © 2026

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