mallardduck / whodis
A simple to use whois client for PHP
1.0.0
2023-01-22 02:03 UTC
Requires
- php: ^8.0
- jeremykendall/php-domain-parser: ^6.1
- mallardduck/whois-client: 3.0.0
- mallardduck/whois-server-list: ^2.0
- symfony/polyfill-intl-idn: ^1.27
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.1
- infection/infection: ^0.26
- pestphp/pest: ^1.11
- phpcompatibility/php-compatibility: ^9.3
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
- symfony/var-dumper: ^5.4
- vimeo/psalm: ^5.0
Suggests
- ext-intl: If installed will use this instead of symfony polyfill.
This package is auto-updated.
Last update: 2024-10-23 02:35:40 UTC
README
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 BSDwhois
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 security@php-http.org.
License
The MIT License (MIT). Please see License File for more information.