I have a php file which requests xml data and displays it it the browser. The XML is displayed by:
$xmlString = constructPostCallAndGetResponse($endpoint, $item, $postCode, $dist);
$resp = simplexml_load_string($xmlString);
echo htmlentities($xmlString);
How do I save the returned XML to an XML file on my server? Ive read alot about DOM but keep going in circles. Can anyone suggest a simple way of doing this?