Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/12/2020 in all areas

  1. 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 }
    1 point
×
×
  • Create New...