well i have started my next project.
its a quick example of how i will generate a quote to a image
http://www.thermomods.com/files/quote.php
but i need some help breaking the quote line into 2 lines, here is my code
Code:
can someone help? I have noticed that it does nothing to split the line, but it does read it
its a quick example of how i will generate a quote to a image
http://www.thermomods.com/files/quote.php
but i need some help breaking the quote line into 2 lines, here is my code
Code:
<?php
header ("Content-type: image/png");
$img_handle = imagecreatefrompng("quote.png");
$color = imagecolorallocate ($img_handle, 100, 100, 100);
$random = "quote.txt";
$fp = file($random);
srand((double)microtime()*1000000);
$rl = $fp[array_rand($fp)];
$input_array = explode(' (',$rl);
$line1 = $input_array[0];
$line = explode('; ',$input_array[1]);
$line2 = $line[2];
imagestring ($img_handle, 3, 10, 5, "$line1", $color);
imagestring ($img_handle, 3, 10, 15, "$line2", $color);
imagepng ($img_handle);
imagedestroy ($img_handle);
?>
can someone help? I have noticed that it does nothing to split the line, but it does read it