Jump to content

Chrisdave

Members
  • Posts

    5
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Chrisdave reacted to Tyson in BLESTA WORDPRESS DOMAIN CHECKER INTEGRATIONS   
    Blesta doesn't currently have a generic domain availability checker for you to integrate with in other systems. Currently, domain lookups are done using a specific module in Blesta (e.g. Enom).
    What you can do is use the Blesta API SDK to call ModuleManager::moduleRpc to check a domain's availability, e.g.:
    // Load the API SDK require_once "blesta_api.php"; $user = "username"; $key = "key"; $url = "https://yourdomain.com/installpath/api/"; $api = new BlestaApi($url, $user, $key); // Choose one of the domain registrar modules from Blesta to use to lookup domain availability $module_id = 1; // set to the module ID of the domain module you want to use, like Enom $module_row_id = 1; // set the specific module row ID from the module that you want to use $domain = "google.com"; // the domain to check for availability $response = $api->get( "ModuleManager", "moduleRpc", ['module_id' => $module_id, 'method' => 'checkAvailability', 'params' => [$domain], 'module_row_id' => $module_row_id] ); // View the response from the check if ($response->response() === true) { // The domain is available } else { // The domain is not available }  
×
×
  • Create New...