Create hosting

				
					StructOperationResponse WebHostingCreate(string $IDSession, string $fqdn, string $offer, int $duration, array $cms)
			

Create a hosting.

REQUIRED

  • idSession string (32)
    Session ID
  • fqdn string
    Fully qualified domain name of the hosting’s main vhost.
  • offer string
    Hosting product ID (See Web hosting products).
  • duration integer
    Duration in months.
  • cms array
    CMS to pre-install (provide empty array for none).
    • To install WordPress:
      {type;”wordpress”,
      sitename: “Name of the website”,
      useradmin: “Admin’s username”,
      emailadmin: Admin’s email address,
      passwordadmin: Admin’s password,
      language: “EN” / “FR”}
    • To install Prestashop:
      {type:”prestashop”,
      sitename: “Name of the website”,
      emailadmin: “Admin’s email address”,
      passwordadmin: “Admin’s password”,
      firstname: Admin’s firstname,
      lastname: Admin’s lastname,
      newsletter: 0 / 1,
      language: “EN” / “FR”}

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $cms = array(
        "type" => "wordpress",
        "name" => "My candy shop",
        "useradmin" => "admin",
        "emailadmin" => "admin@mycandyshop.com",
        "passwordadmin" => "12abCD%@",
        "language" => "EN",
    );
    $idSession = $clientSOAP->sessionOpen("XX000", "XX000", "EN"); 
    $clientSOAP->WebHostingCreate($idSession , "wordpress.netim.com", "SHWEB", 12, $cms); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}