title: Save DOMDocument problem (maybe use cURL?)
body: <p>I currently have a very simple news system that reads in RSS from a local file using <code>DOMDocument-&gt;load()</code>.  In addition there is a very simple back end that adds items to the loaded feed and saves it back using <code>DOMDocument-&gt;save()</code>.</p>
  
  <p>This works fine on my testing server, but when deployed to the client the save operation fails with a 500 error.  I think this is due to limitations they have in place which also prevent use of <code>fopen</code> and <code>file_get_contents</code>, although I'm confused by how I can load the XML fine, but not save it back again.</p>
  
  <p>So really I have two questions (naughty, I know):</p>
  
  <ol>
  <li>Does DOMDocument's save method differ substantially from load, and what is the underlying technique used to write the file?</li>
  <li>How would I go about saving a DOMDocument object as XML using cURL (because I know cURL is permitted)?</li>
  </ol>
  
  <p>For what it's worth, here is a truncated version of the load/save:</p>
  
  <pre><code>//load the xml
  $doc = new DOMDocument();
  $doc-&gt;load($_SERVER['DOCUMENT_ROOT'].'/news_rss.xml');
  $doc-&gt;formatOutput = true;
  //add some stuff to the xml ...
  
  //save it again
  $doc-&gt;save($_SERVER['DOCUMENT_ROOT'].'/news_rss.xml');
  </code></pre>