I use something similar, can't remember where from, it's not identical but it might be of help
Make a file, example MyBBSig.php file in your forum root
<?php
define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);
require "./inc/init.php";
$stats = $cache->read("stats");
Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG("./images/signature.png");
$imgcolor = ImageColorAllocate ($img_handle, 153, 153, 153);
$imgcolorhead = ImageColorAllocate ($img_handle, 255, 255, 255);
ImageString ($img_handle, 3, 5, 2, $mybb->settings['homename']." - ". $mybb->settings['homeurl'], $imgcolorhead);
ImageString ($img_handle, 2, 5, 15, "Total Members: ". my_number_format($stats['numusers']), $imgcolor);
ImageString ($img_handle, 2, 171, 15, "Total Posts: ". my_number_format($stats['numposts']), $imgcolor);
ImageString ($img_handle, 2, 327, 15, "Total Threads: ". my_number_format($stats['numthreads']), $imgcolor);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
Now
$img_handle = imageCreateFromPNG("./images/signature.png");
you need an image at /images/signature.png (rename to whatever/wherever you want) that is 468x31px
I have attached a blank green template
When you want to embed it somewhere, you will embed the php file just like an image, example
[img]http://www.yourforum.org/MyBBSig.php[/img]
and it will display.
If you want to change the text color you can by editing the RGB color codes in this lines
$imgcolor = ImageColorAllocate ($img_handle, 153, 153, 153);
$imgcolorhead = ImageColorAllocate ($img_handle, 255, 255, 255);
you can kinda see what goes where, etc etc, adding multiple colors is simple
example, if you want Total Members to display in pink, find
$imgcolor = ImageColorAllocate ($img_handle, 153, 153, 153);
and add this under
$imgcolor2 = ImageColorAllocate ($img_handle, 255, 192, 203);
and change the following line
ImageString ($img_handle, 2, 5, 15, "Total Members: ". my_number_format($stats['numusers']), $imgcolor);
to
ImageString ($img_handle, 2, 5, 15, "Total Members: ". my_number_format($stats['numusers']), $imgcolor2);
blah blah you get my drift regarding editing.