Is there such a script?

I was wondering if there was a PHP script that would put custom text on an image, and then save the image. There would be a text field where text would be inserted. Then the text would appear on the image, and the image would be saved with the text on it.

Is this possible? I am very new when it comes to coding.

Never had to do it, but you might look into using the gd library.

I do something similar for my captcha form where it generates the text randomly though I don’t see why you couldn’t use a form to decide the text. Idk how you would do it to an already existing image though.

Here’s a basic watermark script - http://www.php.net/manual/en/image.examples.merged-watermark.php. Change the text in

imagestring($stamp, 5, 20, 20, ‘libGD’, 0x0000FF);
imagestring($stamp, 3, 20, 40, ‘© 2007-9’, 0x0000FF);

and that should work.

Sponsor our Newsletter | Privacy Policy | Terms of Service