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