开发者

image download from another server [duplicate]

开发者 https://www.devze.com 2023-02-17 08:41 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: PHP save image file 开发者_StackOverflow
This question already has answers here: Closed 10 years ago.

Possible Duplicate:

PHP save image file

开发者_StackOverflow

I want to download images from another server. I have their http path. their is one way that I can download image by right click on it and save this image. but I want to same action with php coding. is there any method or any script which help or any idea which is useful in this action.


If you want to download & save an image somwhere:

file_put_contents('/path/to/save/image', file_get_contents($imageurl));


php has at least one simple function for that purpose:

$filecontent = file_get_contents($imageurl);
0

精彩评论

暂无评论...
验证码 换一张
取 消