Well, this is what I have right now.
$bg = imagecreatefrompng('bg.png');
$font = "font.ttf";
$white = imagecolorallocate($bg, 255, 255, 255);
header("Content-type: image/png");
imagettftext($bg, 25, 0, 5, 83, $white, $font, date('d.m.Y'));
imagettftext($bg, 30, 0, 5, 145, $white, $font, date('H:i'));
imagepng($bg);
imagedestroy($bg);
I would like to know how can I actually save created image. I was trying to do something like that:
imagepng($bg,"/users/user/");
To save is but it doesn't work at all. So can anybody tell me how to save image?
Thank you.