comparison php/requestKey.php @ 2629:6324f500beb3

Use simplexml_load_string
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 19 Jan 2017 11:27:29 +0000
parents 9c7501dac617
children 3986de98f04a
comparison
equal deleted inserted replaced
2628:9c7501dac617 2629:6324f500beb3
57 // Generate the XML Base file and save it 57 // Generate the XML Base file and save it
58 $doc_struct = new SimpleXMLElement('<waetresult/>'); 58 $doc_struct = new SimpleXMLElement('<waetresult/>');
59 $doc_struct->addAttribute("key",$key); 59 $doc_struct->addAttribute("key",$key);
60 // Add the root 60 // Add the root
61 if (file_exists($testURL)) { 61 if (file_exists($testURL)) {
62 $test_proto = new SimpleXMLElement(file_get_contents($testURL, FILE_TEXT)); 62 $test_proto = simplexml_load_string(file_get_contents($testURL, FILE_TEXT));
63 $doc_struct->addChild($test_proto); 63 $doc_struct->addChild($test_proto);
64 } 64 }
65 // Add start time 65 // Add start time
66 // Add IP Address information 66 // Add IP Address information
67 // Save the file 67 // Save the file