title: Pipe a file through php
body: <p>My case as follows: 
  I have a route on server X that returns files to be downloaded by the client's browser (with all headers + filename set).</p>
  
  <p>I want this request to go through a php server, so server X is never exposed to the end user.</p>
  
  <p>Basically what i want to do is to pipe the original request (which was already tested and working as intended) through my php server, retaining all of the original headers.</p>
  
  <p>For some reason I'm having a hard time achieving this, so suggestions could be great.</p>
  
  <p>Thanks in advance!</p>
  
  <p>For clarification:</p>
  
  <p>Lets say we go to the browser and type this url: <a href="http://serverX/downloadFile" rel="nofollow noreferrer">http://serverX/downloadFile</a></p>
  
  <p>The result is:
  Docx file with the name "myfile.docx" downloads.</p>
  
  <p>Now what i want is to pipe this request through my php server, so when i type the url:
  </p>
  
  <p>The result will be:
  Docx file with the name "myfile.docx" downloads.</p>
  
  <p>Code wise, i would expect it to look something like that:</p>
  
  <pre><code>Echo Pipe_request($url);
  </code></pre>
  
  <p>Thanks!</p>