This is a simple code with imagecreate() from manual :Originally posted by acerdude
ok, im not sure how to use the gdlib, could you explain?
<?php
header ("Content-type: image/png");
$im = @imagecreate (50, 100)
or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng ($im);
?>
If you have subscribed successfully, you can login by ftp : ftp://you.wz.cz@you.wz.cz .btw, i got an email from wz.cz, but i couldnt figure out what it said beacuse i dont speak that. Do you know what im suposed to do with the email?
The above code works well in wz.cz .but i need to know how to use the specific servers gdlib, i cant find how. i think i might have to activate it.
Your code returns png info successfully but with some extra characters. I dont know what is wrong .Originally posted by acerdude
I made a php file out of that script and uploaded and ran it. i dont think it worked, here it is http://sweetsite.wz.cz/inst.php
header ("Content-type: image/jpeg");
$im = imagecreate (200, 30);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
imagettftext ($im, 20, 0, 10, 20, $white, cwd()."/myfont.ttf", "Hello"); // or just "myfont.ttf" without cwd()
imagejpeg ($im);
imagedestroy ($im);