Logic, but in a different way

Daft Logic

PHP Text to Image

Change the settings and the click Create

Text The text to display
Rotation 0=normal 90=sideways
Font Size Points
Font
Padding Space around the image
Transparent  
Fore Colour R G B (0-255)
Back Colour R G B (0-255)
(pop-up window)  

Description

This script is a means to convert a string of text into an image. This has some simple uses such as displaying text such as email address that cannot be programmatically found. This can help to reduce the possibility of your email address being picked up by web crawlers and used for junk mail.

How To Use

To use the example interface above, simply modify or insert the string of text. You can edit any of the other settings, but this is optional.

Further Uses and Ideas:

How it Works:

The PHP Script

contact us for more information

Further Help

For anyone finding problems using this...

(1) Please test this example to ensure imagecreate works on your server...

<?php
header("Content-type: image/png");
$im = @imagecreate(110, 20)
    or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>

(2) Make sure to use the example at the top of this page by sending POST variables from your form. For example msg,font,size ...

Relevant Links

Previous Comments For This Page

text quality is bad
By ali on 29/11/2011
Not support utf-8 character ! :(
By GaRic on 13/11/2011
how can i add background image??
By florin on 02/11/2011
The script is working fine for me. How can we merge image icons along with the text? eg: Heart Shape, Cross shape "Dummy Text %u2665 "
By Prashant on 18/10/2011
Please how to enable the final font will be displayed somewhere at the same page as this application?
By hi on 16/08/2011
The text looks very poor quality. Is there some anti-aliasing effect you could put on it? Could you also add multi-line with justification alignment.
By Leon on 15/08/2011
thanx gonna use, but haven't tested yet.
By whattimein.com on 19/07/2011
how to work this code in php plz explain... I create image in text
By sk on 17/06/2011
php code not get in this site
By sk on 17/06/2011
Change the form so the input comes from a textarea instead of from an input element. :D I put in text with line breaks, it was only 3 lines long but, the script put out the expected result. :D Nice. :D
By Matthew Kastor-Inare III on 03/06/2011
great coding.. thank you
By san india on 01/06/2011
nice and thx
By @lek on 14/04/2011
gud
By gud on 07/04/2011
OMG great script! worked 100% from the beginning. Changed the font, etc. Thanks a lot!
On 07/04/2011
Demo is broken. Leaves little to no hope for the script.
On 11/02/2011
is it possible to generate a multi lines text image ??
By lamouchi on 26/01/2011
It doesn't work.
On 24/01/2011
Works Fine for me.. but how to save in a directory using the php code itself
By Balaji on 16/12/2010
how can i add background image???
By Usman on 07/12/2010
this source code can not support arabic text work just latin text
By ahmad on 25/10/2010
here is an aplication online, very simple http://www.pacificinversiones.com/webmaster/allphp/
By Robert on 23/10/2010
It works fine, but how to place it between text on website?
By tom on 24/08/2010
this class has one error with cordinates when i only insert character "a"
By chaunh on 28/07/2010
To make it work without the form, you need to change the 'isset lines' to this form: if (isset($_GET['msg'])) $text->msg = $_GET['msg']; // text to display
On 23/07/2010
What about UTF-8 support?
By Canser on 19/07/2010
hindi fonts eg mangal.ttf matra gets shifted...
By Devendra singh on 12/07/2010
Useless
By Bekaar Hai on 02/07/2010
The displayed PNG is quite ugly, and this script needs to be changed to display aliased fonts, to clean up the jagged edges.
On 01/06/2010
it is working in localhost but not in server
By subhas on 23/09/2009
this doesn't work. all i changed in the script was "default font. directory relative to script directory." to my fonts path directory and added the PHP to the front/end of the script and it doesn't work. when i run the script i keep getting the default text converted to image "no text". if i type new text in the form fields or change any of the values none of that is changed in the image. its always the "no text" image that comes up.
On 05/06/2009

30 out of 32 comments shown. See all comments.

Add your own comment below and let others know what you think:

Comments :

Your Name (optional) :