I'm trying to make a form with domain.tld check.
I created a field called "domain" and after making the expression valitation, I want to include a little checker to see if the domain is available.
The expression validator is this:
function ff_Dominio_validation(element, message)
{
var check =
/^(?[a-zA-Z0-9]{2,63}))\.(?[com\es\net\org\com.es]{2,6}))+$/;
if (!check.test(element.value)){
if (message=='') message = " La sintaxis del dominio no es válida.\n";
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_Dominio_validation
The process is a multi page form with the first page that validates the domain, checking expression and availability, if those two conditions are ok, the user can continue to the next screen.
I've found this in internet, but I don't know hoy I can implement it in this workflow.
if ( gethostbyname($domain) != $domain ) {
echo "DNS Record found";
}
else {
echo "NO DNS Record found";
}