Dzięki, ale bardziej chodzi mi o takie coś:
mam kod np:
$html_code = "
<html>
<head>
<title>My test title</title>
</head>
<body>
this is the body
</body>
</html>";
i żeby z tego php zrobił mi obrazek na którego tle będzie tylko napis "this is the body"
Próbowałem tak :
Kod
$img = imagecreate("300", "600");
imagecolorallocate($img,0,0,0);
$c = imagecolorallocate($img,70,70,70);
imageline($img,0,0,300,600,$c2);
imageline($img,300,0,0,600,$c2);
$white = imagecolorallocate($img, 255, 255, 255);
imagettftext($img, 9, 0, 1, 1, $white, "arial.ttf", $html_code);
header("Content-type: image/jpeg");
imagejpeg($img);
ale w obrazku dalej był kod html