Witajcie
mam problem z funkcją ttftext (na local'u działa ok niestety na serwerze (60free.ofv.org) nie generuje tekstu)

Oto kod pliku generującego obrazek:
<?php
// Deklaracje zmiennych
$fontDir = 'fonts/';
$fontFiles = array('verdana.ttf', 'impact.ttf', 'comic.ttf', 'arial.ttf'); $string = $_GET["text"];
$r = $_GET["r"];
$g = $_GET["g"];
$b = $_GET["b"];
$width = strlen($string) * 15
+ 10; $height = 25;
// Przesłanie nagłówków
header('Content-type: image/'.$imgType);
$img = imagecreate($width, $height);
// Deklaracje kolorów
$back = imagecolorallocate ($img, 255, 255, 255);
$font = imagecolorallocate ($img, $r, $g, $b);
$dots = imagecolorallocate
($img, rand(0
, 255
), rand(0
, 255
), rand(0
, 255
));
// Generator plam
for($i = 0; $i < round($width / 1
.5
); $i++) {
{
imageellipse
($img, $x, $y, rand(2
, 4
), rand(3
, 6
), $dots); $pts[] = $x.'_'.$y;
}
else
{
$i--;
}
}
// Generator textu
for($i = 0; $i < strlen($string); $i++) {
imagettftext
($img, rand(14
, 16
), rand(-10
, 10
), rand(3
, 5
) + $i * 15
, 20
+ rand(-3
, 3
), $font, $fontDir.'/'.$fontFiles[rand(0
, count($fontFiles) - 1
)], $string{$i}); }
imagecolortransparent ($img, $back);
// Wysłanie i zniszczenie obrazka
imagepng($img);
imagepng($img, "email.png");
imagedestroy($img);
?>
Live demo:
http://minimal2.ovh.org/index.php (efekt widoczny po wypełnieniu forumlarza)