update and fix
This commit is contained in:
parent
173145bf67
commit
2b72751113
@ -2,7 +2,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"io-developer/php-whois": "^4.1"
|
"datingvip/php-whois": "^4.1"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
149
composer.lock
generated
149
composer.lock
generated
@ -4,20 +4,20 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "abc998f727883b7b212185e84742fa24",
|
"content-hash": "fdaab4a8d82e80a5483f0d110540895c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "io-developer/php-whois",
|
"name": "datingvip/php-whois",
|
||||||
"version": "4.1.7",
|
"version": "4.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/io-developer/php-whois.git",
|
"url": "https://github.com/DatingVIP/php-whois.git",
|
||||||
"reference": "6c6cd1d7392d76ba18752cf37227433b50b0bac9"
|
"reference": "b54f1b9ad19836913c8868a86113d2d3b9a8d8ef"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/io-developer/php-whois/zipball/6c6cd1d7392d76ba18752cf37227433b50b0bac9",
|
"url": "https://api.github.com/repos/DatingVIP/php-whois/zipball/b54f1b9ad19836913c8868a86113d2d3b9a8d8ef",
|
||||||
"reference": "6c6cd1d7392d76ba18752cf37227433b50b0bac9",
|
"reference": "b54f1b9ad19836913c8868a86113d2d3b9a8d8ef",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"php": ">=7.2",
|
"php": ">=7.2",
|
||||||
"true/punycode": "^2.1"
|
"symfony/polyfill-intl-idn": "^1.27"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^8.0"
|
"phpunit/phpunit": "^8.0"
|
||||||
@ -63,42 +63,36 @@
|
|||||||
"црщшы"
|
"црщшы"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/io-developer/php-whois/issues",
|
"source": "https://github.com/DatingVIP/php-whois/tree/4.1.7"
|
||||||
"source": "https://github.com/io-developer/php-whois/tree/4.1.7"
|
|
||||||
},
|
},
|
||||||
"time": "2022-06-14T10:29:24+00:00"
|
"time": "2025-02-17T12:46:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-intl-idn",
|
||||||
"version": "v1.26.0",
|
"version": "v1.32.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
|
"reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3",
|
||||||
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
"reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.2",
|
||||||
},
|
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||||
"provide": {
|
|
||||||
"ext-mbstring": "*"
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "For best performance"
|
"ext-intl": "For best performance"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
|
||||||
"dev-main": "1.26-dev"
|
|
||||||
},
|
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"url": "https://github.com/symfony/polyfill",
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"name": "symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -106,7 +100,7 @@
|
|||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@ -115,25 +109,30 @@
|
|||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Nicolas Grekas",
|
"name": "Laurent Bassin",
|
||||||
"email": "p@tchwork.com"
|
"email": "laurent@bassin.info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Trevor Rowbotham",
|
||||||
|
"email": "trevor.rowbotham@pm.me"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Symfony Community",
|
"name": "Symfony Community",
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony polyfill for the Mbstring extension",
|
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"compatibility",
|
"compatibility",
|
||||||
"mbstring",
|
"idn",
|
||||||
|
"intl",
|
||||||
"polyfill",
|
"polyfill",
|
||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.32.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -149,73 +148,103 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-24T11:49:31+00:00"
|
"time": "2024-09-10T14:38:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "true/punycode",
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
"version": "v2.1.1",
|
"version": "v1.32.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/true/php-punycode.git",
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
"reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e"
|
"reference": "3833d7255cc303546435cb650316bff708a1c75c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/true/php-punycode/zipball/a4d0c11a36dd7f4e7cd7096076cab6d3378a071e",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
|
||||||
"reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e",
|
"reference": "3833d7255cc303546435cb650316bff708a1c75c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0",
|
"php": ">=7.2"
|
||||||
"symfony/polyfill-mbstring": "^1.3"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"suggest": {
|
||||||
"phpunit/phpunit": "~4.7",
|
"ext-intl": "For best performance"
|
||||||
"squizlabs/php_codesniffer": "~2.0"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"extra": {
|
||||||
"psr-4": {
|
"thanks": {
|
||||||
"TrueBV\\": "src/"
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Renan Gonçalves",
|
"name": "Nicolas Grekas",
|
||||||
"email": "renan.saddam@gmail.com"
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)",
|
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||||
"homepage": "https://github.com/true/php-punycode",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"idna",
|
"compatibility",
|
||||||
"punycode"
|
"intl",
|
||||||
|
"normalizer",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/true/php-punycode/issues",
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0"
|
||||||
"source": "https://github.com/true/php-punycode/tree/master"
|
|
||||||
},
|
},
|
||||||
"abandoned": true,
|
"funding": [
|
||||||
"time": "2016-11-16T10:37:54+00:00"
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"ext-json": "*"
|
"ext-json": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": {},
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "7.4"
|
"php": "7.4"
|
||||||
},
|
},
|
||||||
"plugin-api-version": "2.3.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,14 @@ if (!file_exists($file))
|
|||||||
$now = time();
|
$now = time();
|
||||||
$config = parse_ini_file($file);
|
$config = parse_ini_file($file);
|
||||||
|
|
||||||
|
# all TLDs info - here: https://www.iana.org/domains/root/db
|
||||||
|
$custom_tld_servers = [
|
||||||
|
'in' => 'whois.nixiregistry.in',
|
||||||
|
'ws' => 'whois.website.ws',
|
||||||
|
'online' => 'whois.nic.online',
|
||||||
|
'us' => 'whois.nic.us',
|
||||||
|
];
|
||||||
|
|
||||||
function handle_result(int $type, string $host, int $exp, Logger $logger) {
|
function handle_result(int $type, string $host, int $exp, Logger $logger) {
|
||||||
global $now, $config;
|
global $now, $config;
|
||||||
|
|
||||||
@ -118,16 +126,19 @@ function ssl_expire_notifier() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function whois_expire_notifier() {
|
function whois_expire_notifier() {
|
||||||
|
global $custom_tld_servers;
|
||||||
|
|
||||||
$domains = get_top_domains();
|
$domains = get_top_domains();
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$whois = Factory::get()->createWhois();
|
$whois = Factory::get()->createWhois();
|
||||||
|
|
||||||
if (preg_match('/\.ws([:]\d+)?$/', $domain)) {
|
if (preg_match('/\.('.implode('|', array_keys($custom_tld_servers)).')([:]\d+)?$/', $domain, $match)) {
|
||||||
$customServer = new TldServer(".ws", "whois.website.ws", false, Factory::get()->createTldParser());
|
$customServer = new TldServer(".".$match[1], $custom_tld_servers[$match[1]], false, Factory::get()->createTldParser());
|
||||||
$whois->getTldModule()->addServers([$customServer]);
|
$whois->getTldModule()->addServers([$customServer]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$logger = new Logger($domain);
|
$logger = new Logger($domain);
|
||||||
|
$logger->debug('connecting...');
|
||||||
try {
|
try {
|
||||||
$info = $whois->loadDomainInfo($domain);
|
$info = $whois->loadDomainInfo($domain);
|
||||||
handle_result(TYPE_WHOIS, $domain, $info->expirationDate, $logger);
|
handle_result(TYPE_WHOIS, $domain, $info->expirationDate, $logger);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user