Hai there, I'm using a little script to output random text to an image (PNG). But the problem is that it doesnt parse /n/r inside it, to make the new lines.
It just, displays them. Here is the script:
PHP Code:
<?php
$quotes = file('imagequotes.txt');
$quote = rand(0, sizeof($quotes)-1);
$cquote = $quotes[$quote];
$image=imageCreate(660,40);
$white=imageColorAllocate($image,255,255,255);
$black=imageColorAllocate($image,0,0,0);
$grey=imageColorAllocate($image,199,199,199);
imageColorTransparent($image, $white);
imageFilledRectangle($image,0,0,250,20,$white);
ImageTTFText ($image,13,0,2,10,-$grey, "arial.ttf","$cquote");
imagePNG($image);
imageDestroy($image);
?>
Anyone have any idea how to fix it?