PHP code example of chanshige / whois

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

    

chanshige / whois example snippets



use Chanshige\WhoisFactory;
use Chanshige\Contracts\WhoisInterface;

$whois = (new WhoisFactory())->newInstance();
/** @see WhoisInterface */
$whois->query('domain-name.example');

$response = $whois->response();
$response->raw(); // return a whois raw data.