The documentation for imagecreatefromjpeg(), imagettftext() and imagejpeg() suggests that it should be straightforward to overlay the information on a basemap. Have you tried it?
You also could set up a cron process using ImageMagick and do this outside of the PHP environment.