I just started with php and made an image. But when I try to open it in my browser, it shows a broken image icon. I have put the font in the same folder as the .php file, but it doesn't work. Can somebody help me solve this problem?
Here is the code:
<?php
$font_path = "nakedchick.TTF";
$font_size = 30;
$img_number = imagecreate(300,50);
$backcolor = imagecolorallocate($img_number,0,162,255);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = " So your ip is $_SERVER[REMOTE_ADDR]? ";
ImageTTFText($img_number, $font_size,10,5,5,$number,$font_path,$textcolor);
header("Content-type: image/png");
imagepng($img_number);
?>
And also the files: (.php in attachment)
http://falcogerritsjans.nl/u/signature2.php
http://falcogerritsjans.nl/u/nakedchick.ttf
17912_.php