I am trying to "copy" a file from a remote server that is being forced to download through the browser. The headers that the remote file outputs are as follows:

HTTP/1.1 200 OK  

Server: nginx  

Date: Tue, 01 Mar 2011 00:19:21 GMT  

Content-Type: application/txt  

Content-Length: 170783  

Last-Modified: Tue, 01 Mar 2011 00:00:43 GMT  

Connection: close  

Content-Disposition: attachment; filename="titles.txt"  

Expires: Tue, 01 Mar 2011 02:19:21 GMT  

Accept-Ranges: bytes 

I need some sort of way to override the attachment Content-Disposition so that php can copy the file to the local server. Either that, or some other way of downloading the file from the remote server into the local.

The file to download is a simple text file which would normally be displayed in the browser however I need PHP to "download" it locally as a sort of cache.

I've looked around this site but none of the attempts I've found worked >\_<

Any suggestions?!

Thanks in advance,
ShadowPuppet