If you look there, this is what I'm going for. Auto-updating stats on the .png image.
I can do this just fine (get stats and show image) but my image is viewed through the php file I create. How can I get it to update MY png image to show the latest stats from the php file?
Well, you can either configure your server to execute image files as PHP, then save your php file with the extension of your choice (who knows what side-effects that would have), or have your PHP script save the image on your server every time it runs...
But all that's really a lot of extra work. Why can't you just use the PHP extension?
As far as I know, then, your only real option is to use your PHP script to actually save an image file to your server (If you're in the situation described above). This isn't very hard...just use imagepng with the second argument as your filename. The only downside is that in order to regenerate your image, you'll have to re-run your script. You could do this manually or set up a cron job to do it automatically for you every so often.
We'll need to see the image and what you want to write on it.
So an example of both the blank image and one with text so we know
what it's supposed to look like.
I never tried it, but Mod Rewrite with a .htaccess file might be able to do it. It has the ability to rewrite urls and even extensions to urls so you may be able to rewrite the .php file to .png