How to check if a site is registered?

0

How can I check if a particular domain (DNS) is available for registration? Basically what I need is to do a WHOIS query. I will do this query in PHP.

    
asked by anonymous 23.03.2016 / 14:06

2 answers

3

Perhaps what you need is a WHOIS query.

There is a library called link that uses a series of services for consultation link

Example usage:

<?php
require_once 'vendor/autoload.php';

$sld = 'dominio.com.br';//Dominio que quer verificar

$domain = new Phois\Whois\Whois($sld);

if ($domain->isAvailable()) {
    echo 'Domínio disponível';
} else {
    echo 'Domínio indisponível';
}

Although not mentioned in the repository, it requires composer.

However if you are not using composer, in the case of this specific repository you can try downloading link and copy the folder src to your project then make the class call like this:

<?php
require_once 'src/Phois/Whois/Whois.php';

$sld = 'dominio.com.br';//Dominio que quer verificar

$domain = new Phois\Whois\Whois($sld);

if ($domain->isAvailable()) {
    echo 'Domínio disponível';
} else {
    echo 'Domínio indisponível';
}
    
26.03.2016 / 22:19
2

Are you referring to having the domain registered in competent bodies such as registration.br or the site already published?

If it is for domain registration issues, the "whois" command does this, displaying domain owner information (if available), date of registration, expiration, etc.

To check whether the site is published and online, there are services like Down For Everyone Or Just Me that show the current status of the site , whether online or offline.

    
23.03.2016 / 14:28