support .ws TLD in whois lookups
This commit is contained in:
parent
21ad7d82e3
commit
173145bf67
@ -5,6 +5,7 @@ require_once __DIR__.'/../vendor/autoload.php';
|
|||||||
require_once __DIR__.'/lib/Logger.php';
|
require_once __DIR__.'/lib/Logger.php';
|
||||||
|
|
||||||
use Iodev\Whois\Factory;
|
use Iodev\Whois\Factory;
|
||||||
|
use Iodev\Whois\Modules\Tld\TldServer;
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
@ -117,10 +118,15 @@ function ssl_expire_notifier() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function whois_expire_notifier() {
|
function whois_expire_notifier() {
|
||||||
$whois = Factory::get()->createWhois();
|
|
||||||
|
|
||||||
$domains = get_top_domains();
|
$domains = get_top_domains();
|
||||||
foreach ($domains as $domain) {
|
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);
|
$logger = new Logger($domain);
|
||||||
try {
|
try {
|
||||||
$info = $whois->loadDomainInfo($domain);
|
$info = $whois->loadDomainInfo($domain);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user