PHP code example of aquy / yii2-whois
1. Go to this page and download the library: Download aquy/yii2-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/ */
aquy / yii2-whois example snippets
$sld = 'reg.ru';
$domain = new Phois\Whois\Whois($sld);
$whois_answer = $domain->info();
echo $whois_answer;
if ($domain->isAvailable()) {
echo "Domain is available\n";
} else {
echo "Domain is registered\n";
}