A simple to use whois client for PHP
A simple to use high-level Whois client for PHP.
- PHP >= 8.0
The best installation method is to simply use composer.
composer require mallardduck/whodis
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
whoisclient, docs assume your client matches BSD
whoiswhich provides recursive results by default.
$ 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.
- Add result parsing features,
- Refactor lookup output to provide POPO of info,
- Allow output as plain text, or POPOs; maybe different methods?
Please see our contributing guide.
If you discover any security related issues, please contact us at email@example.com.
The MIT License (MIT). Please see License File for more information.