Changing headers and saving file

落爺英雄遲暮 提交于 2019-12-25 01:55:34

问题


When I am in example.com/name.php?id=1&image=33 I can see a certain jpg but I cant save it. In chrome dev tools I can see the path to the jpg but I cant access it directly with the url.

How can I use wget or curl (or other in php) to save this file? I think I would need to curl the jpg link but sending the info to the server of the path where I can see the image but I just cant do it.

If someone knows how to do this please explain with detailed info since I think I am lacking a lot of knowledge here.


回答1:


but I cant save it

How are you trying to save it? Have you tried disabling Javascript in the browser

In chrome dev tools I can see the path to the jpg....How can I use wget or curl

By replicating the successful request headers. It's further possible that you may have to replicate one of the preceding requests.

Someone has put some effort into making it difficult for you to retrieve this content - implying that you may be breaching the terms of use by downloading the file.



来源:https://stackoverflow.com/questions/22173358/changing-headers-and-saving-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!