|
|
@ -53,7 +53,7 @@ class Dig |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static function records(string $hostname, array $records, array &$result = [], array &$error = [], ?string $provider = null): array |
|
|
|
public static function records(string $hostname, array $records, array &$result = [], array &$error = [], ?string $provider = null, int $timeout = 5): array |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (self::isProvider($provider)) |
|
|
|
if (self::isProvider($provider)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -69,7 +69,7 @@ class Dig |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (self::isRecord($record)) |
|
|
|
if (self::isRecord($record)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($values = exec(sprintf('dig %s %s %s +short', (string) $provider, (string) $record, (string) $hostname))) |
|
|
|
if ($values = exec(sprintf('dig %s %s %s +short +time=%d', (string) $provider, $record, $hostname, $timeout))) |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach (explode(PHP_EOL, $values) as $value) |
|
|
|
foreach (explode(PHP_EOL, $values) as $value) |
|
|
|
{ |
|
|
|
{ |
|
|
|