PHP code example of tda / laravel-netcup
1. Go to this page and download the library: Download tda/laravel-netcup 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/ */
tda / laravel-netcup example snippets
use Tda\LaravelNetcup\Netcup;
$clientRequestId = 'your_id'; //optional
$client = new Netcup($clientRequestId);
('services.netcup.api_key'),
('services.netcup.api_password'),
('services.netcup.customer_number')
$netcup->setConfig('apis.netcup');
$netcup->useSoap();
$domains = $netcup->listAllDomains(); //it return as Collection
$domain = $netcup->infoDomain('mydomain.com');
$domain = $netcup->searchDomain('somedomain.com');
$price = $netcup->priceTopLevelDomain('de');
$authcode = $netcup->getAuthCodeDomain('somedomain.com');
//or from a domain object
$domain = $netcup->infoDomain('mydomain.com');
$authcode = $netcup->getAuthCodeDomain($domain);
$contact = new Tda\LaravelNetcup\Contactentries;
$contact->ownerc = {Id of contact handle}; // obligatory
$contact->adminc = {Id of contact handle};
$contact->techc = {Id of contact handle};
$contact->zonec = {Id of contact handle};
$contact->billingc = {Id of contact handle};
$contact->onsitec = {Id of contact handle};
$contact->generalrequest = {Id of contact handle};
$contact->abusecontact = {Id of contact handle};
$domain = $netcup->createDomain('mydomain.com', $contact);
$handles = $netcup->listAllHandle(); //it return as Collection
$handle = $netcup->infoHandle($handle_id);
$newHandle = new \Tda\LaravelNetcup\NetcupHandle();
$newHandle->type = 'organisation';
$newHandle->name = 'Your Lame';
$newHandle->organisation = 'Your organisation name';
$newHandle->street = 'Street';
$newHandle->type = 'organisation'; //(person|organisation|role|request)
$newHandle->postalcode = "0000";
$newHandle->city = "City";
$newHandle->countrycode = "DE";
$newHandle->telephone = "telefone number";
$newHandle->email = "[email protected] ";
$newHandle->assignedtodomain = true;
$response = $netcup->createHandle($newHandle);
$handle = $netcup->infoHandle($handle_id);
$hande->email = "[email protected] ";
$response = $netcup->updateHandle($handle);
$handle = $netcup->infoHandle($handle_id);
$response = $netcup->deleteHandle($handle);
$response = $netcup->infoDnsZone('somedomain.com');
//or from the Domain object
$domain = $netcup->infoDomain('mydomain.com');
$response = $netcup->infoDnsZone($domain);
$response = $netcup->infoDnsRecords('yourdomain.com');
//or from the Domain object
$domain = $netcup->infoDomain('mydomain.com');
$response = $netcup->infoDnsRecords($domain);
$messageCount = 10; // optional; standard = 50
$response = $netcup->poll($messageCount);
$response = $netcup->ackPoll($poll_id);