有http://www.mysite.com
和http://www.anothersiter.com
网站。有链接到一些文件http://www.anothersite.com
:PHP更改下载位置的技巧
http://www.anothersite.com/file1
http://www.anothersite.com/file2
...
http://www.anothersite.com/fileN
我想将上面的网站访问者对http://www.mysite.com
链接可以下载。但我希望它们被下载,好像它们来自http://www.mysite.com
而不是http://www.anothersite.com
。是否有可能在PHP中实现这样的场景,以及如果可能的话如何?
这取决于你是什么意思的“下载好像他们来自'http:// www.mysite.com'”这深入到一些潜在的安全漏洞,明显被浏览器阻止。 – crush
是的,您将通过某种类型的代理脚本通过您的服务器下载它们。 – datasage
所以你想代理请求到另一个网站的内容? –