Warning: This library is in development phase and is not stable for real usage yet.
PhpWhois library is inspired by PHPWhois.org library and others, but aims to be updated for more recent version of PHP and with more domain servers.
PhpWhois library requires PHP 8.1.
You can install the PhpWhois library with Composer (recommended way):
composer require petk/phpwhois
You can load PhpWhois library by using Composer's autoloader:
<?php
// index.php
require('vendor/autoload.php');
use PhpWhois\Whois;
$whois = new Whois('yourdomain.tld');
echo $whois->lookup();
This library is licensed under the MIT License.