n@1090: OK".$key_requested.""; n@1090: $xml_bad = "NO".$key_requested.""; n@1090: $xml_error = "ERROR".$key_requested.""; n@1090: if (is_array($saves)) n@1090: { n@1090: foreach($saves as $filename) { n@1090: $xml_string = file_get_contents($filename, FILE_TEXT); n@1090: $xml_object = simplexml_load_string($xml_string); n@1090: if ($xml_object != false) { n@1090: if (isset($value['key'])) n@1090: { n@1090: if ($value['key'] == $key_requested) { n@1090: echo $xml_bad; n@1090: return; n@1090: } n@1090: } n@1090: } n@1090: } n@1090: echo $xml_good; n@1090: // TODO: n@1090: // Generate the XML Base file and save it n@1090: $doc_struct = new SimpleXMLElement(''); n@1090: $doc_struct->addAttribute("key",$key_requested); n@1090: // Add start time n@1090: // Add IP Address information n@1090: // Save the file n@1090: $doc_struct->asXML("saves/save-".$key_requested.".xml"); n@1090: return; n@1090: } else { n@1090: echo $xml_error; n@1090: return; n@1090: } n@1090: ?>