Witam
Mam taki kod:
  1. srand((float) microtime() * 10000000);
  2. $wejscie = array ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "r", "s", "t", "w", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",);
  3. $losowe_klucze = array_rand ($wejscie, 5);
  4. $pis = $wejscie[$losowe_klucze[0]]. "\n" .
  5. $wejscie[$losowe_klucze[1]] . "\n" .
  6. $wejscie[$losowe_klucze[2]] . "\n" .
  7. $wejscie[$losowe_klucze[3]] . "\n" .
  8. $wejscie[$losowe_klucze[4]];
  9.  
  10.  
  11. // Create the image
  12. $im = imagecreatetruecolor(130, 30);
  13.  
  14. // Create some colors
  15. $white = imagecolorallocate($im, 255, 127, 80);
  16. $grey = imagecolorallocate($im, 128, 128, 128);
  17. $black = imagecolorallocate($im, 255, 255, 255);
  18. imagefilledrectangle($im, 0, 0, 399, 29, $white);
  19.  
  20. $pis = '';
  21. foreach($losowe_klucze as $klucz){
  22. $pis .= $wejscie[$klucz];
  23. }
  24.  
  25. // The text to draw
  26. $text = $pis;
  27. $zapis = mktime();
  28. $zapisz = $zapis.".png";
  29. $otworz = "./indetyfikatory/".$zapis.".png";
  30. $czas = $zapis - 600;
  31. // Replace path by your own font path
  32. $font = 'arial.ttf';
  33.  
  34. // Add some shadow to the text
  35. imagettftext($im, 20, -5, 11, 21, $grey, $font, $text);
  36.  
  37. // Add the text
  38. imagettftext($im, 20, -5, 10, 20, $black, $font, $text);
  39.  
  40. // Using imagepng() results in clearer text compared with imagejpeg()
  41. imagepng($im, "./indetyfikatory/$zapisz");
  42. imagedestroy($im);


Czemu na obrazie nie ma tekstu questionmark.gif