//the location of your external XML file. Basic HTTP Auth can be added if necessary
$url = “https://someurl.com/somefile.xml”; //grab the XML and save it to a temp XML file
$ch = curl_init($url);
$fp = fopen(“temp.xml”, “w”);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);//Load the local XML that was created in the above CURL call
$xml = simplexml_load_file(“temp.xml”)
or Die (‘ERROR: Could not load file’);print_r($xml);
Writer. Musician. Adventurer. Nerd.
Purveyor of GIFs and dad jokes.