Example Code (PHP)

<?php
$data = array(
    "action"		=> "RegisterDomain",
    "token"             => "AaLc8eNZWsZtWlT9LtT7NUha",
    "authemail"         => "test@exampledomain.com",
    "sld"		=> "domainexample",
    "tld"		=> "ly",
    "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"
)));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://my.register.ly/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);
$result = curl_exec($ch);
$res    = json_decode($result, true);
print_r($res);
curl_close($ch);
?>
Share this:
FacebookTwitterWhatsAppViberCopy LinkTelegramLinkedIn
Updated on October 9, 2022

Was this article helpful?

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support