The following additional fields are used to register .nu domains:
Field | Description | Mandantory | |
x-nu-iis-idno | Personal identification number, corporate identity number or registration designation in a governmental register. For contacts located in Sweden a valid Swedish ID number is necessary. Format: 1234567890 i.e. not letters, only numbers. |
YES | |
x-nu-iis-vatno | For companies located in EU member states (but not in Sweden) the VAT id has to be specified. Format: [DE]1234567890 |
NO |
$domain = "testareseller2.nu"; list($sld,$tld) = preg_split("/\./", $domain, 2); $additionalfields["x-nu-iis-idno"] = "5566412762"; // Org. number. Mandantory. $api_email = "reseller@johndoe.com"; $api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $data = array( "token" => $api_key, "authemail" => $api_email, "action" => "RegisterDomain", "sld" => $sld, "tld" => $tld, "regperiod" => 1, "nameserver1" => "ns1.mydns.net", "nameserver2" => "ns2.mydns.net", "dnsmanagement" => 0, // Very important "emailforwarding" => 0, // Very important "idprotection" => 0, // Very important "firstname" => "John", "lastname" => "Doe", "companyname" => "John Doe Inc.", "address1" => "Box 147", "city" => "Tyresö", "country" => "SE", "postcode" => "13523", "phonenumber" => "+46.811223344", // Alternativly 0811223344, cc fetched from country. "email" => "john@johndoe.com", "domainfields" => base64_encode(serialize($additionalfields)), // Very important ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://konto.registrera-doman.se/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, CURLINFO_HEADER_OUT, 1); $result = curl_exec($ch); $res = json_decode($result, true); print_r($result); print_r($res); curl_close($ch);