biteit / domain-expiration-fetcher
Fetches Domain Expiration date from WHOIS servers
0.1.6
2020-01-15 07:29 UTC
Requires
- php: >=7.1.0
- io-developer/php-whois: ^3.4
README
Fetches Domain Expiration information from WHOIS servers
Usage:
$ds = new \BiteIT\Utils\DomainExpirationFetcher(); if($ds->canFetchInfoAbout('com'){ $date = $ds->fetchExpirationDate($domain); var_dump($date); }
There are certain WHOIS servers that do not publish expiration dates, they are specified in DomainExpirationFetcher::TLDS_WITH_NO_INFO, and as of this date I found out these are the TLDs: 'de', 'eu', 'at', 'bg', 'cy', 'es', 'gr', 'hu', 'ch', 'be', 'lu', 'lv', 'ph', 'no', 'name', 'kz', 'ge', 'az'
If you want to customize any parser or add your own, check WhoisInfoParser.php abstract class and its implementation in whois-parsers folders. You can then set the parser by using
$ds->setWhoisParser($instanceOfMyParser, 'mytld')