开发者

image download from another server [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜