PHP Creating watermark text

How to create text watermark using php?This is describes how to create simple text watermark using php.Tested in many browsers.Uploaded file type is same to final image type.Only you have to call to the function and get output.View demo and download source code.

In the another post is describes how to create simple image watermark using php.But this watermark text is very simply an smiler to it.First you get a font that you want to apply to this(Ex: TIMES.TTF for Time New Roman font).
Everything I’ll describes here simply by commenting.
This is the php function.

[stextbox id=”info”]

  • 0 – text rotation
  • 140 – The x-cordinate.From left-to-right distance.simply like left padding of the image
  • 270 – The y-cordinate. From top-to-bottom distance.simply like top padding of the image


This is the html form.

Now see, how to call to this function.

Now put this all together.

That’s only.

View Demo

Download PHP Creating watermark text Example (567 KB)

Published by

Sumith Harshan

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.