2017-10-27 06:42
浏览 891

PHP - 从链接下载pdf文件并保存在本地文件夹中

I am trying to get through an API, a live open access pdf file, and then download that file to my server. However the PDF file does not end with a ".pdf" extension but is encapsulated in a more complexe url: A web browser would simply ask to open or save it as a PDF file, whereas my script cannot translate it as such. How can I make my PHP script recognize this url as a PDF file? Thanks in advance. Olivier

图片转代码服务由CSDN问答提供 功能建议

我正在尝试通过API,实时开放访问pdf文件,然后将该文件下载到我的服务器 。 但是,PDF文件不以“.pdf”扩展名结尾,而是封装在更复杂的网址中: 网络浏览器只是要求打开或将其保存为PDF文件,而我的脚本无法翻译 因此。 如何让我的PHP脚本将此URL识别为PDF文件? 提前谢谢。 Olivier </ p> </ div>

3条回答 默认 最新

相关推荐 更多相似问题