PHP code example of madeitbelgium / domainbox

1. Go to this page and download the library: Download madeitbelgium/domainbox library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

madeitbelgium / domainbox example snippets


"madeitbelgium/domainbox": "~0.*"

MadeITBelgium\Domainbox\DomainboxServiceProvider::class,

'Domainbox' => MadeITBelgium\Domainbox\DomainboxFacade::class,


use MadeITBelgium\Domainbox\Domainbox;

$domainbox = new Domainbox($reseller, $username, $password, $sandbox); //Sandbox by default false


$checkDomainAvailability = Domainbox::domain()->checkDomainAvailability($domainname, $launchPhase = 'GA', $allowOfflineLookups = false, $numberOfRetries = 1); // \MadeITBelgium\Domainbox\Response\DomainAvailable
$checkDomainAvailability->isAvailable();

$checkDomainAvailability = Domainbox::domain()->checkDomainAvailabilityPlus($domainname, $tlds); // Array of \MadeITBelgium\Domainbox\Response\DomainAvailable
$checkDomainAvailability[0]->isAvailable();

public function store(Request $request) {
    $this->validate($request, ['domainname' => 'domainname|domainavailable']);
}