Add domain alias

				
					StructOperationResponse WebHostingVhostUpdate(string $IDsession, string $id, string $action, array $params)
			

Create a domain alias.

REQUIRED

  • idSession string (32)
    Session ID.
  • id string
    Hosting ID.
  • action string
    Set to “AddAlias”.
  • params array
    {“fqdn”:  fqdn of the vhost, “alias”: fqdn of the new alias}.

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $params = array("fqdn" => "test.wordpress.netim.com",
         "alias" => "dev.wordpress.netim.com");
 
    $idSession = $clientSOAP->sessionOpen("XX000", "xxxxxxxx"); 
    $clientSOAP->WebHostingVhostUpdate($idSession, "NW1024", "AddAlias", $params)); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}