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
437 stars 117 forks source link

Other whois server host #199

Closed ispweb closed 1 year ago

ispweb commented 1 year ago

When i add:

$ServerWhois =TldServer::fromData([ "zone" => ".nl", "host" => "rwhois.domain-registry.nl", ]); $whois->getTldModule()->addServers([$ServerWhois]);

and do an lookup, it still uses whois.domain-registry.nl.

We want to change the whois server for our own domains to use a diffent as the default.

io-developer commented 1 year ago

Hi You should insert it before default .nl - https://github.com/io-developer/php-whois/blob/master/src/Iodev/Whois/Configs/module.tld.servers.json#L782 Or remove default .nl from servers completely.

Fetch default server list by getServers() then modify .nl part and set new list back by setServers() - https://github.com/io-developer/php-whois/blob/master/src/Iodev/Whois/Modules/Tld/TldModule.php#L58