PHP code example of boltegg / whois

1. Go to this page and download the library: Download boltegg/whois library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

boltegg / whois example snippets




$whois = new \Whois();

$domain = 'google.com';

$whois_result = $whois->getInfo($domain);
echo $whois_result;




$whois = new \Whois();

if ($whois->isAvailable($domain)) {
    echo "Domain is available\n";
} else {
    echo "Domain is registered\n";
}