PHP code example of digicatech / domain-name-api-lib

1. Go to this page and download the library: Download digicatech/domain-name-api-lib 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/ */

    

digicatech / domain-name-api-lib example snippets


composer 

use digicatech\DomainNameApiLib\DomainNameApiLib;

$dna =  new  DomainNameApiLib('ownername' , 'ownerpass' , true);



$dna = new  \digicatech\DomainNameApiLib\DomainNameApiLib('ownername' , 'ownerpass' , true);

$list = $dna->GetList(['OrderColumn'=>'Id', 'OrderDirection'=>'ASC', 'PageNumber'=>0,'PageSize'=>1000]);

$list = $dna->GetTldList(100);

$check = $dna->CheckAvailability('domainadi.com',1,'create');

$detail = $dna->GetDetails('domainadi.com');

$ns = $dna->SetNameservers(ModifyNameServer('domain.com',['ns1'=>'ns1.domain.com','ns2'=>'ns2.domain.com']);

$lock = $dna->EnableTheftProtectionLock('domainadi.com');


$lock = $dna->DisableTheftProtectionLock('domainadi.com');

$childns = $dna->AddChildNameServer('domainadi.com','ns1.domainadi.com','1.2.3.4');


$contact = [
    "FirstName"        => 'Bunyamin',
    "LastName"         => 'Mutlu',
    "Company"          => '',
    "EMail"            => '[email protected]',
    "AddressLine1"     => 'adres 1 adres 1 adres 1 ',
    "AddressLine2"     => 'test test',
    "AddressLine3"     => '',
    "City"             => 'Kocaeli',
    "Country"          => 'TR',
    "Fax"              => '2626060026',
    "FaxCountryCode"   => '90',
    "Phone"            => '5555555555',
    "PhoneCountryCode" => 90,
    "Type"             => 'Contact',
    "ZipCode"          => '41829',
    "State"            => 'GEBZE'
];

$childns = $dna->SaveContacts('domainadi.com','ns1','1.2.3.4');


$contact = $dna->GetContacts('domainadi.com');

$lock=$dna->Renew('domainadi.com',1);

$lock=$dna->SyncFromRegistry('domainadi.com');

$balance_usd = $dna->GetCurrentBalance(); //Varsayılan USD
$balance_usd = $dna->GetCurrentBalance('USD');
$balance_try = $dna->GetCurrentBalance('TRY');
$balance_usd = $dna->GetCurrentBalance(1); // 1=TRY/TL
$balance_try = $dna->GetCurrentBalance(2); // 2=USD
  
$reseller = $dna->GetResellerDetails();


$contact = [
    "FirstName"        => 'Bunyamin',
    "LastName"         => 'Mutlu',
    "Company"          => '',
    "EMail"            => '[email protected]',
    "AddressLine1"     => 'adres 1 adres 1 adres 1 ',
    "AddressLine2"     => 'test test',
    "AddressLine3"     => '',
    "City"             => 'Kocaeli',
    "Country"          => 'TR',
    "Fax"              => '2626060026',
    "FaxCountryCode"   => '90',
    "Phone"            => '5555555555',
    "PhoneCountryCode" => 90,
    "Type"             => 'Contact',
    "ZipCode"          => '41829',
    "State"            => 'GEBZE'
];

$info = $a->RegisterWithContactInfo(
    'domainadi.com.tr',
    1,
    [
        'Administrative' => $contact,
        'Billing'        => $contact,
        'Technical'      => $contact,
        'Registrant'     => $contact
    ],
    ["tr.atakdomain.com", "eu.atakdomain.com"],true,false,
    [
        'TRABISDOMAINCATEGORY' => 1,
        'TRABISCITIZIENID'     => '1112221111111',
        'TRABISNAMESURNAME'    => 'Bunyamin Mutlu',
        'TRABISCOUNTRYID'      => '215',
        'TRABISCITYID'        => '41'
    ]);