diff options
author | Evgeny Sorokin <me@ch1p.io> | 2024-06-25 14:29:50 +0300 |
---|---|---|
committer | Evgeny Sorokin <me@ch1p.io> | 2024-06-25 14:29:50 +0300 |
commit | 173145bf67115a4ee68a80171d3cd2f874e296c0 (patch) | |
tree | a8c6d489c3d7a13f2ef7bd7cf10b6225287aad97 | |
parent | 21ad7d82e3954701fb41463be7055e79e1fba9f4 (diff) |
-rwxr-xr-x | src/ssl_expire_notifier.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ssl_expire_notifier.php b/src/ssl_expire_notifier.php index 7d881e2..2b674cb 100755 --- a/src/ssl_expire_notifier.php +++ b/src/ssl_expire_notifier.php @@ -5,6 +5,7 @@ require_once __DIR__.'/../vendor/autoload.php'; require_once __DIR__.'/lib/Logger.php'; use Iodev\Whois\Factory; +use Iodev\Whois\Modules\Tld\TldServer; error_reporting(E_ALL); ini_set('display_errors', 1); @@ -117,10 +118,15 @@ function ssl_expire_notifier() { } function whois_expire_notifier() { - $whois = Factory::get()->createWhois(); - $domains = get_top_domains(); foreach ($domains as $domain) { + $whois = Factory::get()->createWhois(); + + if (preg_match('/\.ws([:]\d+)?$/', $domain)) { + $customServer = new TldServer(".ws", "whois.website.ws", false, Factory::get()->createTldParser()); + $whois->getTldModule()->addServers([$customServer]); + } + $logger = new Logger($domain); try { $info = $whois->loadDomainInfo($domain); |