PHPackages                             phergie/phergie-irc-plugin-dns - 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. phergie/phergie-irc-plugin-dns

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

phergie/phergie-irc-plugin-dns
==============================

Phergie plugin for Looking up IP's by hostnames

4.0.0(10y ago)11.5k31MITPHPPHP &gt;=5.5

Since Apr 25Pushed 9y ago5 watchersCompare

[ Source](https://github.com/phergie/plugin-dns)[ Packagist](https://packagist.org/packages/phergie/phergie-irc-plugin-dns)[ RSS](/packages/phergie-phergie-irc-plugin-dns/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (12)Used By (1)

DNS Plugin
==========

[](#dns-plugin)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for Looking up IP's by hostnames.

[![Build Status](https://camo.githubusercontent.com/44de63fe40f6afa411cef6e92ce3b5a496440c4f318de69ef76c4fd8f189d6ce/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706865726769652f706c7567696e2d646e732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/phergie/plugin-dns)

Install
-------

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.

```
composer require phergie/phergie-irc-plugin-dns

```

See Phergie documentation for more information on [installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).

Configuration
-------------

[](#configuration)

```
new \Phergie\Plugin\Dns\Plugin([

    // All configuration is optional

    'dnsServer' => '1.2.3.4', // IP address of a DNS server, defaults to Google's 8.8.8.8

    // or

    'command' => 'customDns', // command name, defaults to dns

    // or

    'resolver' => new React\Dns\Resolver\Resolver(), // provide your own Resolver instance
                                                     // defaults to null and is set at first use
                                                     // (don't use this unless you know what you are doing!)

    // or

    'enableCommand' => false,  // enable use access to the dns command
])
```

Events
------

[](#events)

This plugin listens on a few events providing the resolver to other plugins that wish to make use of it.

### dns.resolve

[](#dnsresolve)

The `dns.resolve` event accepts a callback that will be called with a `Promise` that will resolve once the given hostname has been resolved. (If promises are new to you, be sure to read [this](https://gist.github.com/domenic/3889970).)

```
$this->emitter->emit('dns.resolve', [function($promise) use ($callback, $that) {
    $promise->then(function($ip) {
        echo 'IP for github.com: ' . $ip . PHP_EOL;
    });
}]);
```

### dns.resolver

[](#dnsresolver)

The `dns.resolver` event accepts a callback that will be called once a `Resolver` instance has been created.

```
$this->emitter->emit('dns.resolver', [function($resolver) use ($callback, $that) {
    $resolver->resolve('github.com')->then(function($ip) {
        echo 'IP for github.com: ' . $ip . PHP_EOL;
    });
}]);
```

Tests
-----

[](#tests)

To run the unit test suite:

```
curl -s https://getcomposer.org/installer | php
php composer.phar install
cd tests
../vendor/bin/phpunit

```

License
-------

[](#license)

Released under the MIT License. See `LICENSE`.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 93.1% 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 ~67 days

Recently: every ~91 days

Total

10

Last Release

3794d ago

Major Versions

0.2.0 → 1.0.02014-06-24

1.0.0 → 2.0.02014-11-15

2.1.0 → 3.0.02015-09-03

3.0.2 → 4.0.02015-12-28

PHP version history (2 changes)2.0.0PHP &gt;=5.4.0

4.0.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcee902e735164c0ac8b0b362f5a1b0f29323921cabbc8f1f3fa65aecb42718a?d=identicon)[svpernova09](/maintainers/svpernova09)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (81 commits)")[![svpernova09](https://avatars.githubusercontent.com/u/967362?v=4)](https://github.com/svpernova09 "svpernova09 (3 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![michaelcullum](https://avatars.githubusercontent.com/u/211740?v=4)](https://github.com/michaelcullum "michaelcullum (1 commits)")

---

Tags

pluginbotreactircphergiephergieplugin

### Embed Badge

![Health badge](/badges/phergie-phergie-irc-plugin-dns/health.svg)

```
[![Health](https://phpackages.com/badges/phergie-phergie-irc-plugin-dns/health.svg)](https://phpackages.com/packages/phergie-phergie-irc-plugin-dns)
```

PHPackages © 2026

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