Código de Ejemplo (PHP)

<?php
$data = array(
    "action"		=> "RegisterDomain",
    "token"             => "AaLc8eNZWsZtWlT9LtT7NUha",
    "authemail"         => "test@dominiodeejemplo.com",
    "sld"		=> "dominiodeejemplo",
    "tld"		=> "com",
    "regperiod"		=> 1,
    "nameserver1"       => "ns1.dominiodeejemplo.com",
    "nameserver2"       => "ns2.dominiodeejemplo.com",
    "nameserver3"       => "ns3.dominiodeejemplo.com",
    "nameserver4"       => "ns4.dominiodeejemplo.com",
    "nameserver5"       => "ns5.dominiodeejemplo.com",
    "dnsmanagement"	=> 1,
    "emailforwarding"	=> 1,
    "idprotection"	=> 1,
    "firstname"         => "Pedro",
    "lastname"          => "Perez",
    "companyname"	=> "Empresa Personal",
    "address1"          => "Direccion 1",
    "address2"          => "Direccion 2",
    "city"		=> "Ciudad",
    "state"             => "LO",
    "country"           => "EC",
    "postcode"          => "12345",
    "phonenumber"	=> "4455677888990",
    "email"             => "usuario@dominiodeejemplo.com",
    "adminfirstname"	=> "Pedro",
    "adminlastname"	=> "Perez",
    "admincompanyname"	=> "Empresa Personal",
    "adminaddress1"	=> "Direccion 1",
    "adminaddress2"	=> "Direccion 2",
    "admincity"		=> "Ciudad",
    "adminstate"	=> "EC",
    "admincountry"	=> "IT",
    "adminpostcode"	=> "EC",
    "adminphonenumber"	=> "4455677888990",
    "adminemail"	=> "admin@dominiodeejemplo.com",
    "domainfields"      => base64_encode(serialize(array_values(array())
)));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.nodored.com/clientes/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);
?>
  • 3 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Related Articles

Guia de Instalación para el Modulo de Registro de Dominios (WHMCS)

Instrucciones para la instalación del módulo de WHMCS. Este modulo esta disponible para clientes...

Introducción al API para Resellers de Dominios

El API para Resellers de Dominios te permite interactuar con nuestro sistema de forma...

Acciones API

RegisterDomain: Este comando se usa para enviar una solicitud de registro de dominio al...