Jump to content
[MUST READ] Forum Rules ×

selamhosting

Senior Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by selamhosting

  1. 17 hours ago, mike said:

    If you use whmcs its a piece of cake to implement. And is "officially " supported, you can find how to configure it on MOFH site.

    I can not make a cause but on the support nobody wants to help nobody hiding secrets nobody wants to give nobody thank you
    
     

  2. I do not know where you add these codes, whmcs is an external script

    Example

    use \HansAdema\MofhClient\Client;
    
    // Create a new API client with your API credentials.
    $client = Client::create([
        'apiUsername' => 'your_api_username',
        'apiPassword' => 'your_api_password',
        'plan' => 'my_plan', // Optional, you can define it here or define it with the createAccount call.
    ]);
    
    // Create a request object to create the request.
    $request = $client->createAccount([
        'username' => 'abcdefgh', // A unique, 8 character identifier of the account.
        'password' => 'password123', // A password to login to the control panel, FTP and databases.
        'domain' => 'userdomain.example.com', // Can be a subdomain or a custom domain.
        'email' => '[email protected]', // The email address of the user.
        'plan' => 'my_plan', // Optional, you can submit a hosting plan here or with the Client instantiation.
    ]);
    
    // Send the API request and keep the response.
    $response = $request->send();
    
    // Check whether the request was successful.
    if ($response->isSuccessful()) {
       echo 'You can login as: ' . $response->getVpUsername();
    } else {
       echo 'Failed to create account: ' . $response->getMessage();
    }
×
×
  • Create New...