Last active
December 18, 2015 08:09
-
-
Save shyamsalimkumar/5752362 to your computer and use it in GitHub Desktop.
PHP - Download & save a remote image on your server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadFromRemote($imageUrl = '', $saveFilePath) { | |
$image = file_get_contents($imageUrl); | |
return file_put_contents($saveFilePath, $image); //save the image on local server | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment