Create new host

				
					StructOperationResponse hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)

				
			

Create a new host at the registry.

REQUIRED

  • idSession string (32)
    Session ID.
  • host string (255)
    Hostname (example : “ns1.example.com”).
OPTIONAL

  • ipv4 array
    IPv4 addresses.
  • ipv6 array
    IPv6 addresses.

An Object of type StructOperationResponse

  • At least one IP must be provided (IPv4 or IPv6).
  • To function properly, the host must be declared in the DNS settings of the domain with all corresponding A records (for IPv4) and AAAA records (for IPv6)
  • The management of hosts is not supported by all extensions.
<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
$host = "xxx.example.com"; 
$ipv4 = array("192.134.0.129"); 
$ipv6 = array("2001:660:3006:4:0:0:1:1"); 
 
try 
{ 
      $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); 
 
      $StructOperationResponse = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); 
 
      print_r($StructOperationResponse);
} 
catch(SoapFault $fault) 
{ 
      echo "Exception : " .$fault->getMessage(). "\n"; 
} 
 
if(isset($idSession)) 
{ 
      $clientSOAP->sessionClose($idSession); 
} 
?>