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