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

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
you need to enforce a maximum font size (input value) with php to prevent abuse.
On 28/01/2009
Does not seem to work with non-latin text.
By Tael_ on 17/12/2008

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

Comments :

Your Name (optional) :