Tweet
<?php
$image = imagecreate(400, 30);
$white = imagecolorallocate($image, 255, 255, 255);
$grey = imagecolorallocate($image, 128, 128, 128);
$black = imagecolorallocate($image,50,50,50);
imagefilledrectangle($image, 0, 0, 399, 29, $white);
$text = 'Welcome to my blog ';
$font = 'verdana.ttf';
imagettftext($image, 20, 0, 10, 20, $black, $font, $text);
header('Content-Type: image/png');
imagepng($image);
imagedestroy($image);
?>
Output : Welcome to my blog
Note : Include the 'verdana' font file in the same directory as that of the PHP script otherwise the script will not run.
Text Output using PHP
Posted by
LAHAUL SETH
~
Text Output using PHP
2012-01-15T19:39:00+05:30
LAHAUL SETH
PHP
|
Comments
Text Output using PHP
2012-01-15T19:39:00+05:30
LAHAUL SETH
PHP
|