The imagecreate functions require a filepath as input, so you would need to curl the remote image to a local file and then feed that local file into the function.
You could try something like this.
$local_image_filepath = ‘google.png’;
$remote_image_url = ‘http://www.google.com/images/logos/ps_logo2.png’;
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $remote_image_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
$image_source_code = curl_exec($ch);
Then you would just use the $local_image_filepath as the parameter in the imagecreate functions.