title: How to open an http file with fopen()?
body: <p>I need to open a http external xml file, then replace some text and save the file in the hosting of my site.</p>
  
  <p>Somethinkg like this:</p>
  
  <pre><code>&lt;?php
  
  $xml_external_path = 'http://someplace.com/external_file.xml';
  $xml_external = fopen($xml_external_path, "w+");
  
  
  //here the code to replace text
  
  $xml_local_path = 'http://www.misite.com/local_file.xml';
  $xml_local = fopen($xml_sw_path, "w+");
  
  fwrite($xml_local, $xml_external);
  
  fclose($xml_external);
  fclose($xml_local);
  ?&gt;
  </code></pre>
  
  <p>Problem is that I get this message:</p>
  
  <blockquote>
    <p>Warning: fopen(<a href="http://someplace.com/external_file.xml" rel="nofollow">http://someplace.com/external_file.xml</a>): failed to open
    stream: HTTP wrapper does not support writeable connections at...</p>
    
    <p>Warning: fopen(<a href="http://someplace.com/local_file.xml" rel="nofollow">http://someplace.com/local_file.xml</a>): failed to open
    stream: HTTP wrapper does not support writeable connections at...</p>
  </blockquote>
  
  <p><strike>Both files are writeable.</strike></p>