PHP >= 8.1
composer require phant/domain-name
use Phant\DomainName\Service\DnsRecord;
$dnsRecordDetail = (new DnsRecord())->get(
'domain.ext',
DnsRecord::A
);
$dnsRecordExist = (new DnsRecord())->exist(
'domain.ext',
DnsRecord::A
);
use Phant\DomainName\Service\ServiceProvided;
$isEmailServiceProvider = (new ServiceProvided())->isEmailServiceProvider(
'domain.ext'
);
$isTrashMailBoxService = (new ServiceProvided())->isTrashMailBoxService(
'domain.ext'
);