I’m wanting to setup a php script and host it on my server that will let me download files from other locations, but making it look like it’s coming from my server. Maybe using curl or htacess. Also I was hoping that there would be a way to get around having my server deal with the bandwidth. Does that make sense? Is this doable?
— Update
Kind of like a proxy, but without the file downloading to memory and then sending it to the client.
You can do this by simply passing the target url to you script, open the url with file_get_contents(), curl or other file functions and echo the data. ensure to set the Content-Type header to “application/octet-stream” to force the browser to save the file instead of displaying it.
As for the bandwidth: You’ll have to deal with it. If your server downloads a file, it will use up the bandwidth. It will even use it up twice because it has to receive AND send the data.
I don’t know why you mention htaccess, because that has nothing to do with your problem.