I just found out that i can use graphics in php thing that made me very happy.
Now... how can i insert this kind of graphic in a html page.
For example i have a table and in one of those cells i want to insert an image created by a function like this:
function draw ()
{
Header("Content-type: image/jpeg");
$image = ImageCreate(200,200);
$bgColor = ImageColorAllocate($image, 255, 204, 0);
imagefill ( $image, 200, 200, $bgColor );
$black = ImageColorAllocate($image, 0, 0, 0);
$blue = ImageColorAllocate($image, 0,128,192);
imagerectangle ($image, 1, 1, 199, 199, $blue );
ImageLine($image, 1, 99, 50, 1, $blue);
ImageLine($image, 50, 1, 99, 99, $blue);
ImageLine($image, 1, 99, 99, 99, $blue);
ImageJPEG($image);
ImageDestroy($image);
}




Bookmarks