<?php
$data = array(
    "action"		=> "RegisterDomain",
    "token"             => "AaLc8eNZWsZtWlT9LtT7NUha",
    "authemail"         => "test@exampledomain.com",
    "sld"		=> "domainexample",
    "tld"		=> "com",
    "regperiod"		=> 1,
    "nameserver1"       => "ns1.domainexample.com",
    "nameserver2"       => "ns2.domainexample.com",
    "nameserver3"       => "ns3.domainexample.com",
    "nameserver4"       => "ns4.domainexample.com",
    "nameserver5"       => "ns5.domainexample.com",
    "dnsmanagement"	=> 1,
    "emailforwarding"	=> 1,
    "idprotection"	=> 1,
    "firstname"         => "John",
    "lastname"          => "Doe",
    "companyname"	=> "Company Name",
    "address1"          => "Address 1",
    "address2"          => "Address 2",
    "city"		=> "City",
    "state"             => "ST",
    "country"           => "IT",
    "postcode"          => "12345",
    "phonenumber"	=> "4455677888990",
    "email"             => "user@domainexample.com",
    "adminfirstname"	=> "John",
    "adminlastname"	=> "Doe",
    "admincompanyname"	=> "Company Name",
    "adminaddress1"	=> "Address 1",
    "adminaddress2"	=> "Address 2",
    "admincity"		=> "City",
    "adminstate"	=> "ST",
    "admincountry"	=> "IT",
    "adminpostcode"	=> "12345",
    "adminphonenumber"	=> "4455677888990",
    "adminemail"	=> "admin@domainexample.com",
    "domainfields"      => base64_encode(serialize(array_values(array())
)));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://domainregister.international/domainsResellerAPI/api.php");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');
$result = curl_exec($ch);
$res    = json_decode($result, true);
print_r($res);
curl_close($ch);
?>

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • API
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

 DomainRegister Third Generation API - Introduction

API Introduction The DomainRegister Third Generation API allows you to interact with our system...

 DomainRegister Third Generation API - Activation and Management

In order to be allowed to use DomainRegister Third Generation API, you're required: to be...

 DomainRegister Third Generation API - example of PHP code (TransferDomain)

<?php $data = array( "action" => "TransferDomain", "token" =>...

 DomainRegister Third Generation API - example of PHP code (CreditAmount)

<?php $data = array( "action" => "CreditAmount", "token" =>...

 DomainRegister Third Generation API - changelog

  13/11/2020 added function CreditAmount (gives the amount of available credit of the...