What resources or libraries are recommended for implementing a Whois query functionality in a PHP project?

When implementing a Whois query functionality in a PHP project, it is recommended to use a library that handles the parsing of Whois server responses and provides an easy-to-use interface for querying domain information. One popular library for this purpose is the "phpWhois" library, which simplifies the process of querying Whois information for a domain.

// Include the phpWhois library
require_once('path/to/phpWhois/Whois.php');

// Create a new instance of the Whois class
$whois = new Whois();

// Query the Whois information for a domain
$domain = 'example.com';
$result = $whois->lookup($domain);

// Output the result
echo $result;