$fp_source = fopen("http://www.server.com/path/source.jpg","rb");
$content = "";
while(!feof($fp_source)) {
$content .= fgets($fp_source, 8192);
}
fclose($fp_source);
$fp_local = fopen("/path/destination.jpg", "wb+");
fputs($fp_local, $content);
fclose($fp_local);
Note : if you are not on Windows, forget rb and wb+... just write r and w+