So I Googled and found out how to draw an arc: http://www.php.net/manual/en/function.imagearc.php
The only problem is how do I write text $margin pixels from the arc
You could try this: http://coding.derkeiler.com/Archive/PHP/alt.php/2004-12/0061.html
Here is a simple PHP solution found at http://forums.phpfreaks.com/topic/57542-image-manipulation-skewing-text-text-on-a-curve/
Imagick has native support for curved text