denismitr/real-domain-validator

This package is abandoned and no longer maintained. No replacement package was suggested.

Validator of domain names that uses DNS to verify the existance of a domain

v1.0.0 2016-07-08 18:12 UTC

This package is auto-updated.

Last update: 2020-01-22 22:42:09 UTC


README

By Denis Mitrofanov, 2016

Installation

composer require denismitr/real-domain-validator

Usage

If you are using Laravel, than you can extend the Laravel validator in AppServiceProvider@boot like so:

Validator::extend('real_domain', 'Denismitr\Validators\RealDomainValidator@validationCallback');

Otherwise just install, instantiate and use isValidDomain method like that:

$validator = new RealDomainValidator();
$result = $validator->isValidDomain("google.com");

Http or https prefixes not a problem - will work as well.