Thanks for the reply. I should have given more information with my first post. What I am trying to do is have the user automatically download an image from a remote server (nirvanix.com). For example, the user clicks on a download link, some verification is done, then they download an image (
http://services.nirvanix.com/Prova/Prov ... hicago.jpg). Currently, I am using the method you described (header('location: '.$URL);). However, using this method the user is basically just redirected to the image. I would like to have the user prompted to save the file for download. This is slightly easier for the user, and this keeps the address of the image on the remote server relatively invisible from the user's perspective. I have used - header("Content-Disposition: attachment; filename='file.jpg'"); - in the past to refer to a local file, but I can't get it to work with a remote file. I tried the code I pasted above (and variations of that code), but I can't seem to figure it out. I tried playing around with file_get_contents() as you suggested, but that hasn't helped me. I am probably misunderstanding your suggestion.
So, is there a way to use the content-disposition header to point to a remote file (so the user downloads the file rather than is redirected to the page)? Is there an example of this that I could look at? Or, is there a better method to perform the desired function?
Thanks in advance for your help.
-Andrew