Added -B flag for RIPE
This commit is contained in:
parent
8400091ee4
commit
07c4476963
1 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,8 @@ use MallardDuck\Whois\Client;
|
|||
|
||||
class WhoisClient {
|
||||
|
||||
const B_FLAG_SERVERS = ["whois.ripe.net"];
|
||||
|
||||
public static function query(string $q): ?ProviderInterface {
|
||||
$server = self::getServer($q);
|
||||
$provider = null;
|
||||
|
@ -27,6 +29,7 @@ class WhoisClient {
|
|||
}
|
||||
|
||||
private static function queryServer(string $q, string $server): WhoisParser {
|
||||
if (in_array($server, self::B_FLAG_SERVERS)) $q = "$q -B";
|
||||
$client = new Client($server);
|
||||
$response = $client->makeRequest($q);
|
||||
return WhoisParser::fromString($response);
|
||||
|
|
Loading…
Reference in a new issue