PHP code example of monovm / whois-php

1. Go to this page and download the library: Download monovm/whois-php 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/ */

    

monovm / whois-php example snippets


use MonoVM\WhoisPhp\Checker;

// Single Domain whois
$result1 = Checker::whois('monovm.com');

// Single Domain whois without specifying TLD
$result2 = Checker::whois('monovm');

// Multiple domains whois
$result3 = Checker::whois(['monovm','google.com','bing']);

use MonoVM\WhoisPhp\Checker;

$result = Checker::whois('monovm', ['popularTLDs' => ['.com', '.net', '.org', '.info']]);

use MonoVM\WhoisPhp\WhoisHandler;

$whoisHandler = WhoisHandler::whois('monovm.com');

$available = $whoisHandler->isAvailable();

$valid = $whoisHandler->isValid();

$message = $whoisHandler->getWhoisMessage();

$tld = $whoisHandler->getTld();

$sld = $whoisHandler->getSld();
bash
composer