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.
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.
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';
}
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.