Text Wrapping in G.D Library

Hi,

I need to know whether the is any possiblity in wraping a long text in a piture that is created with the G.D library function imagettfbox() & imagettftext() function.

for Example the

The Text is like

Welcome to the world of php. Php stands for Hypertext Pre-Processor.

Screenshot 1:

in the screenshot 1 the text is written in the picture but it does not wrap.

I want similar thing like this:

I want some help to wrap the text that is to be written in the picture.

Via imagettftext(). If there is any idea please help me.

Thanks in advance.

    Excerpt taken from PHP.net [man]imagestring[/man] manual page. User comment:

    A simple example:
    To make one line of text fit in the image.
    
    <?php
    header ("Content-type: image/png");
    $string = "spam@mvoncken.nl";                                             
    $font = 4; $width = ImageFontWidth($font) * strlen($string); $height = ImageFontHeight($font); $im = @imagecreate ($width,$height); $background_color = imagecolorallocate ($im, 255, 255, 255); //white background $text_color = imagecolorallocate ($im, 0, 0,0);//black text imagestring ($im, $font, 0, 0, $string, $text_color); imagepng ($im); ?> I use something like this for spamprotection of my visitors (pass userid as an url-parameter for this php)
      Write a Reply...