2017 © Pedro Peláez
 

library phergie-irc-plugin-dns

Phergie plugin for Looking up IP's by hostnames

image

phergie/phergie-irc-plugin-dns

Phergie plugin for Looking up IP's by hostnames

  • Friday, August 19, 2016
  • by svpernova09
  • Repository
  • 5 Watchers
  • 1 Stars
  • 1,145 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 12 Versions
  • 1 % Grown

The README.md

DNS Plugin

Phergie plugin for Looking up IP's by hostnames., (*1)

Build Status, (*2)

Install

To install via Composer, use the command below, it will automatically detect the latest version and bind it with ~., (*3)

composer require phergie/phergie-irc-plugin-dns 

See Phergie documentation for more information on installing and enabling plugins., (*4)

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

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

dns.resolve

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.), (*6)

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

dns.resolver

The dns.resolver event accepts a callback that will be called once a Resolver instance has been created., (*7)

$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

To run the unit test suite:, (*8)

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

License

Released under the MIT License. See LICENSE., (*9)

The Versions

19/08 2016

dev-master

9999999-dev

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

29/12 2015

dev-version-2-updates

dev-version-2-updates

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

29/12 2015

4.0.0

4.0.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

14/11 2015

3.0.2

3.0.2.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

13/09 2015

3.0.1

3.0.1.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

03/09 2015

3.0.0

3.0.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

25/12 2014

2.1.0

2.1.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

15/11 2014

2.0.0

2.0.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

24/06 2014

1.0.0

1.0.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

20/05 2014

0.2.0

0.2.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react phergie phergieplugin

28/04 2014

0.1.1

0.1.1.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react

25/04 2014

0.1.0

0.1.0.0

Phergie plugin for Looking up IP's by hostnames

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin bot irc react