Jump to content

Recommended Posts

Posted

Hello house i found blesta very useful and i am fully ready to deploy with it.

but i am having one single challenge in using this software.

i use WordPress to design my store front, as an hosting provider, but i am finding it difficult to add a domain checker to my domain reg. page.

Others software like whmcs has it everywhere on the web and on wordpress.org.

but can't find any for blesta.

thanks

Please i neeed help

Posted

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
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...