Using GD imagejpeg(), imagegif(), and imagepng() functions, I can save them to the path I want on our server, then replace the image links in the submitted code and all works as expected.
Except for animated .gif's. I didn't really think about it, but I suppose that is still a limitation on the GD imaging software. Only the first frame is written.
The solution I've come up with is to simply grab the contents of the image and write it to a raw file. e.g.
Code: Select all
$file = file_get_contents($imgLink);
$handle = fopen('images/display/' . $newImageName, "w");
fwrite($handle, $file);
fclose($handle);EDIT| Copyright issues shouldn't be a problem.