Example Code (PHP)

 
 
 
<?php
$data = array(
    "action"		=> "RegisterDomain",
    "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,
    "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",
    "additionalfields"  => array()
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://vservs.com/clients/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, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, 1);
$result = curl_exec($ch);
$res    = json_decode($result, true);
print_r($res);
curl_close($ch);
?>
  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

API Introduction

API IntroductionThe Domains Reseller API allows you to interact with our system programmatically...

API Actions

RegisterDomain: This command is used to send a Register command to the registrar.Request...

Vservs B.V. Domain API for WHMCS

How to install Vservs API into youre WHMCS:   Upload the files to you`e WHMCS ftp folder path...