io-developer / php-whois

PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 8.0 compatible (5.4+ old versions)
MIT License
443 stars 118 forks source link

.tw domain name cannot be resolved #191

Open ellermister opened 2 years ago

ellermister commented 2 years ago

PHP-Whois version: master

PHP version: 7.4

Description
.tw domain name cannot be resolved

How to reproduce

$domain = "twnic.tw"

 $whois = Factory::get()->createWhois();

$response = $whois->loadDomainInfo($domain);

var_dump($response->toArray());

Possible Solution
add parser for .tw

Additional context

array(11) {
  ["parserType"]=>
  string(6) "common"
  ["domainName"]=>
  string(8) "twnic.tw"
  ["whoisServer"]=>
  string(0) ""
  ["nameServers"]=>
  array(0) {
  }
  ["creationDate"]=>
  string(0) ""
  ["expirationDate"]=>
  string(0) ""
  ["updatedDate"]=>
  string(0) ""
  ["states"]=>
  array(2) {
    [0]=>
    string(8) "inactive"
    [1]=>
    string(24) "clienttransferprohibited"
  }
  ["owner"]=>
  string(0) ""
  ["registrar"]=>
  string(0) ""
  ["dnssec"]=>
  string(0) ""
}

-- whois command
root@server1:~# whois twnic.tw -h whois.twnic.net.tw
Domain Name: twnic.tw
   Domain Status: ok
   Registrant:
      台灣網路資訊中心
      Taiwan Network Information Center
      IA  ia@twnic.net.tw
      +886.225289696
      +886.225287756
      3F, No.123, Sec.4, Bade Rd., Songshan Dist., Taipei 105, Taiwan
      台北市, 
      TW

   Administrative Contact:
      IA  ia@twnic.net.tw
      +886.225289696
      +886.225287756

   Technical Contact:
      IA  ia@twnic.net.tw
      +886.225289696
      +886.225287756

   Record expires on 2025-10-27 00:00:00 (UTC+8)
   Record created on 2005-10-27 17:02:34 (UTC+8)

   Domain servers in listed order:
      dns2.twnic.net.tw     
      dns1.twnic.net.tw     

Registration Service Provider: TWNIC
Registration Service URL: http://rs.twnic.net.tw/