I got a question, in GD is there a possibility to align text to the center, so when you create a image, the text will be in the center no matter how long it is, i searched on google, and you need a module for that, so i was wondering is there is another way to do it.
You'll need to calculate the center point using either fontwidth() if you're using imagestring() for the text, imagettfbbox() if you're using imagettftext() .. or one of the other bounding box functions if you're using something else to draw the text.
Basically what you'll need to do is:
Calculate the width of the string using imagettfbbox().
Subtract the width of the string from the width of the image.
Divide the result of that by 2.
Draw the text that distance from the left side of the image.
he's just telling you how to work out where to start the text from.
it's just simple logic. i've never used GD before, but I presume he's telling you to work out which pixel is the centre pixel by getting the total width, and halving it (call this value 1). then get the text string total width, half that (call this value 2). subtract value 2 from value 1 and you have the pixel to start from.