request_status == 'success') { if ($dea->domain_status == 'ok') $return = 1; if ($dea->domain_status == 'block') $return = 0; } // If MX checks fail also return 0 elseif ($dea->request_status == 'fail_input_domain') $return = 0; // If the API query return some other response accept the given address anyway. // Too high risk to lose one customer! else $return = 1; } // Wenn Website down ist Registrierung auch zulassen // If the service is currently down and the api does not respond also accept the given email address else $return = 1; } return $return; } // Usage-Example: $email2check = 'nobody@mailinator.com'; if (!check_email($email2check)) echo "The given address is not allowed to register!"; else echo "Welcome to XYZ..."; ?>