问题
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