You could use the function imagecreatefrompng
(I assume that you already know how to get the text from the url.)
The only thing left to do is put that text on the image using the correct colors for you.
<?php
$im = @imagecreatefrompng($imgname);
$text_color = imagecolorallocate ($im, $Red,$Green,$Blue);
imagestring ($im, 3, 5, 15, $SomeTextFromURL, $text_color);
?>
Regards,
Peter Berkhout.