Find this line:
imagestring($img, $font, $width-(strlen($text)*imagefontwidth($font)),
This determines the starting point from the right side, and substract it to get the right width. Change it to:
imagestring($img, $font, 10,
Which will start it from 10 pixel from the left.