Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wildiney/5688837 to your computer and use it in GitHub Desktop.

Select an option

Save wildiney/5688837 to your computer and use it in GitHub Desktop.
Download & save a remote image on your server using PHP
<?php
$image = file_get_contents('http://www.url.com/image.jpg');
file_put_contents('/images/image.jpg', $image); //save the image on your server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment