imagecreate - zeilenumbruch in textausgabe

moin moin,

Ich hätte mal ne kleene frage und zwar wenn ich mit php ein bild genereire, auf dem ein text steht, wie bekomme ich dann in den text einen zeilenumbruch hin? ich habs schon mit br \n etc. probiert, aber das hilft alles nix .. damit man besser versteht, was ich will hab ich mal ein beispiel gemacht :

Code:
PHP:
<?php 
header ("Content-type: image/png"); 
$ip = "Deine IP lautet: " . $_SERVER['REMOTE_ADDR']; 
$schrift = imageloadfont('04b.gdf'); 
$schrifthoehe = ImageFontHeight($schrift); 
$schriftbreite = ImageFontWidth($schrift) * StrLen($ip); 
$im = ImageCreate ($schriftbreite, $schrifthoehe); 
$background_color = ImageColorAllocate ($im, 255, 255, 255); 
imagecolortransparent ($im ,$background_color); 
$text_color = ImageColorAllocate ($im, 233, 14, 91); 
ImageString ($im, $schrift, 0, 0, $ip, $text_color); 
ImagePNG ($im); 
?>


und ich hätte jetzt gerne z.b. zwischen "Deine IP lautet:" und der ip adresse einen zeilenumbruch, aber wie?

hoffe mir kann jmd. helfen
 
bie mir funktioniert folgender code:

PHP:
header ("Content-type: image/png");
$ip = "Deine IP lautet: " . $_SERVER['REMOTE_ADDR'];
//$schrift = imageloadfont('04b.gdf');
//$schrifthoehe = ImageFontHeight($schrift);
//$schriftbreite = ImageFontWidth($schrift) * StrLen($ip);
$im = ImageCreate (400, 400);
$background_color = ImageColorAllocate ($im, 255, 255, 255);
imagecolortransparent ($im ,$background_color);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageTTFText ($im, 10, 0, 200, 195, $text_color, "./ariblk.ttf", "user-sfddfsdf\n\rAL");
//imagestring($im, 40,200,100 , $ip, $background_color);
ImagePNG ($im);
die();
 
Zurück
Oben