image download from another server [duplicate]
开发者_StackOverflowPossible Duplicate:
PHP save image file
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);
精彩评论