'chanshige/whois' is that helps your domain registered information(whois) search.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.coveralls.yml
.gitignore
.travis.yml
README.md
composer.json
composer.lock
extend.functions.php
phpcs.xml
phpmd.xml
phpunit.xml.dist

README.md

Packagist Build Status Coverage Status

chanshige/whois

domain registered information(whois) search.

Installation

With Composer

$ composer require chanshige/whois 'v2.0.1'

usage

<?php
require __DIR__ . '/vendor/autoload.php';

$whois = new \Chanshige\Whois();

try {
    $whois->query('your-domain.name', 'whois.server.host');
    $result = $whois->results();
    
    var_dump($result);
} catch (Exception $e) {
    var_dump($e->getMessage());
}
?>

TLDに対応するWHOISサーバーを指定しない場合は、IANAにサーバー名を問い合わせ、  
存在すれば、自動的にリクエストを行い、結果を返します。

result type

  • isRegistered()
    登録済みドメインかどうか(bool)

  • isReserved()
    予約文字列かどうか(bool)

  • isClientHold()
    ClientHoldとなっているかどうか(bool)

  • results()
    上3つとWHOISを細分化したデータを返す(array)

'tld' => string,
'registered' => bool,
'reserved' => bool,
'client_hold' => bool,
'detail' => [
   'registrant' => array(),
   'admin' => array(),
   'tech' => array(),
   'billing' => array(),
   'status' => array(),
   'date' => array(),
   'name_server' => array(),
]
  • raw()
    加工せず取得したデータのまま返す(array)

test (with coverage)

$ composer test