Skip to content

A simple to use high-level Whois client for PHP.

License

Notifications You must be signed in to change notification settings

mallardduck/whodis

Repository files navigation

Whodis - Easy to use Whois client for PHP

Source Code License PHP Version Latest Stable Version Total Download Count

Purpose

A simple to use high-level Whois client for PHP.

Requirements

  • PHP >= 8.0

Installation

The best installation method is to simply use composer.

https://packagist.org/packages/mallardduck/whodis

Stable version

composer require mallardduck/whodis

Example Usage

require __DIR__ . '/vendor/autoload.php';

use MallardDuck\Whodis\Whodis;

$whodis = new Whodis();
$response = $whodis->lookup('danpock.me', fullResults: true);
echo $response; // Prints WHOIS results identical to running `whois danpock.me` in shell*.
  • = Varies based on CLI whois client, docs assume your client matches BSD whois which provides recursive results by default.

Testing

$ composer test

Note: Due to how fast PHP tests run false-negatives can spawn. Whois servers may disconnect during a test resulting in empty response and failing tests.

TODO Before V2

  • Add result parsing features,
  • Refactor lookup output to provide POPO of info,
  • Allow output as plain text, or POPOs; maybe different methods?

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at [email protected].

License

The MIT License (MIT). Please see License File for more information.

About

A simple to use high-level Whois client for PHP.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages