mallardduck / whois-server-list
A php library to look up the whois servers or a domain.
Requires
- php: ^8.0
- ext-json: *
- thecodingmachine/safe: ^2.4
Requires (Dev)
- ext-intl: *
- mallardduck/whois-client: dev-3.0-main
- pestphp/pest: ^1.21
- phpbench/phpbench: ^1.2
- ramsey/devtools: ^1.7
- ramsey/devtools-lib: dev-fix-compatibility as 1.2.3
- symfony/console: ^6.1
- thecodingmachine/phpstan-safe-rule: ^1.2
- vimeo/psalm: ^4.30
README
A php library to look up the whois servers of a Top Level Domain.
About
This package facilitates the discovery of the authoritative WHOIS server for top level domains. There are two lists to source the WHOIS server info from; the IANA TLD list and the Public Suffix List.
This project adheres to a code of conduct. By participating in this project and its community, you are expected to uphold this code.
Installation
Install this package as a dependency using Composer.
composer require mallardduck/whois-server-list
Usage
Simply initialize a locator for the list you'd like to use.
use MallardDuck\WhoisDomainList\IanaServerLocator; $ianaLocator = new IanaServerLocator(); echo $ianaLocator->getWhoisServer('aarp'); // whois.nic.aarp
Updating
The lists used by this package generate using the script in the ./generator
directory.
This script will download a fresh copy of the list, then look up every TLDs whois server.
To update the list one would simply: clone this repo, run the generator, commit the changes and send a Pull Request.
Contributing
Contributions are welcome! To contribute, please familiarize yourself with CONTRIBUTING.md.
Copyright and License
The mallardduck/whois-server-list library is copyright © Dan Pock and licensed for use under the terms of the MIT License (MIT). Please see LICENSE for more information.