PHP code example of dopee / transip-api
1. Go to this page and download the library: Download dopee/transip-api 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/ */
dopee / transip-api example snippets
$login = ''; // Your login at transip
$privateKey = ''; // Your key from transip
$client = new Transip\Client($login, $privateKey, true);
$domainApi = $client->api('domain');
$domainInfo = $domainApi->getInfo('domain.com');
// This returns an exception if the domain cannot be found !
// So it might be wise to do it in a try catch instruction
$status = $domainApi->checkAvailability();
// returns the string FREE if the domain is available