I can't seem to create dynamic images with php. When I access the file, all I get is a broken image. I also have GD2 installed. This is the code I am using:
<?php
header("Content-Type: image/png");
$id = @ImageCreate(400,125);
$black = ImageColorAllocate($id, 0, 0, 0);
$green = ImageColorAllocate($id, 0, 255, 0);
$white = ImageColorAllocate($id, 255, 255, 255);
$blue = ImageColorAllocate($id, 0, 0, 255);
ImageString($id,5,20,20,"hello",$blue);
ImagePNG($id);
ImageDestroy($id);
?>
Can anyone help me with this?