Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $remoteimage = "http://domain.com/path/to/remote/image.jpg";
- $localimage = "/home/domain/httpdocs/path/to/my/image.jpg";
- if ($content = file_get_contents($remoteimage)) {
- if (!empty($content)) {
- $fp = fopen($localimage, "w");
- fwrite($fp, $content);
- fclose($fp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement