nicholas@2510: ERROR".$key."Could not open file for writing"); nicholas@2510: } nicholas@2510: fclose($fileHandle); nicholas@2510: // TODO: nicholas@2510: // Generate the XML Base file and save it nicholas@2630: $doc_struct = new DOMDocument; nicholas@2630: $doc_struct->preserveWhiteSpace = false; nicholas@2630: $doc_struct->formatOutput = true; nicholas@2753: $doc_struct->loadXML(""); nicholas@2753: $doc_struct->documentElement->setAttribute("key", $key); nicholas@2626: // Add the root nicholas@2628: if (file_exists($testURL)) { nicholas@2631: $test_proto_doc = new DOMDocument; nicholas@2631: $test_proto_doc->loadXML(file_get_contents($testURL, FILE_TEXT)); nicholas@2631: $test_proto = $test_proto_doc->documentElement; nicholas@2630: $test_proto = $doc_struct->importNode($test_proto, true); nicholas@2630: $doc_struct->documentElement->appendChild($test_proto); nicholas@2626: } nicholas@2510: // Add start time nicholas@2510: // Add IP Address information nicholas@2510: // Save the file nicholas@2633: $doc_struct->save($filename); nicholas@2510: echo "OK".$key.""; nicholas@2510: ?>