checkAvailability

%Plugin_Name%_CheckAvailability

Purpose

Use this function prior to new domain registration to check whether a domain name is available.

Input Parameters

  • configarray: an array of parameters defined during the plugin configuration.
  • domainNames: a list of domain names whose availability is to be checked.
  • additionalfields: supplementary data for further domain processing.

Return Parameters

The method returns a structure with the same name as the domain name whose availability is checked, and the following data:

  • status: availability status of the domain. 1 – available; 2 – unavailable.
  • msg: a user-friendly message about domain(s) availability.

Mandatory

No

Example

function Example_CheckAvailability($params)
{
	$domains = $params["domainNames"];
	$result = array();
	
	foreach($domains as $domain) {
		// Check $domain availability
	
		$result[$domain] = array('status' => 1, 'msg' => 'This domain is available');
		// $result[$domain] = array('status' => 2, 'msg' => 'This domain is not available');
		 
	}
	
	return $result;
}
CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.