$output = json_encode($response); } else { $output = json_encode(array("status" => "error", "msg" => "Missing data for delete_record.")); } } // Get Domains by SolusVM Container ID if ($_GET['action'] == 'get_domains_by_solusvmid') { if (!empty($_GET['solusvm_cid'])) { $response = $PowerDNS->getDomainsBySolusVMID($_GET['solusvm_cid']); $output = json_encode($response); } else { $output = json_encode(array("status" => "error", "msg" => "Missing data for get_domains_by_solusvmid.")); } } // Get Records by Domain ID if ($_GET['action'] == 'get_records_by_domain_id') { if (!empty($_GET['domain_id'])) { $response = $PowerDNS->getRecordsByDomainID($_GET['domain_id']); $output = json_encode($response); } else { $output = json_encode(array("status" => "error", "msg" => "Missing data for get_records_by_domain_id.")); } } // Create solusvm_cid Row if ($_GET['action'] == 'create_solus_vmid') { $response = $PowerDNS->createSolusVMID(); $output = json_encode($response); } } // Print Output echo $output;