// Initialize web tier with the site configuration file. InitializeWebTier(); $cred = new MgUserInformation(); $cred->SetMgUsernamePassword("Administrator", "admin"); $cred->SetLocale(GetDefaultLocale()); $cred->SetClientIp(GetClientIp()); $cred->SetClientAgent(GetClientAgent()); $serverAdmin = new MgServerAdmin(); $serverAdmin->Open("localhost", $cred); $operation = $_GET['OPERATION']; //Get all information properties $infoProp = $serverAdmin->GetInformationProperties(); try { switch ($operation) { case "ONLINE": $serverAdmin->BringOnline(); if ($serverAdmin->IsOnline()) { echo "Server online<p>"; } else { echo "Server offline<p>"; } break; case "OFFLINE": $serverAdmin->TakeOffline(); if ($serverAdmin->IsOnline()) { echo "Server online<p>"; } else { echo "Server offline<p>"; } break; case "GETTOTALPHYSICALMEMORY":