PHP Source:

<?php
// CHXO labelgen -- converts a text string INto an IMAGE FILE, mostly to camoflage email addys on websites
// OLD Homepage: http://chxo.com/berylium/software/labelgen.html
// NEW Homepage: http://chxo.com/labelgen/
//
// 2003-04-14 -- initial version
// 2003-04-15 -- added GPL and showsource, no antialiasing at 10 pixels or less

// TODO:
// i18n testing and a unicode font
// image cache subsystem
// convert to free fonts??? help!
// "show webpage php source code" PREVENTS all download access to the FONTS uploaded to this web server ... 
// Just binary upload onto your web server, the supplied PHP file PLUS binary upload all your required fonts ... 



/*
 If you find this 2003 MODIFIED VERSION SOFTWARE useful, please donate some U.S. Dollars by email via 
 <A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_send-outside" > www.PayPal.com </A> 
 All Rights Reserved and Copyright (C) 2003 webmaster-AT-purchase-secure.com.au 
 2003 MODIFIED VERSION SOFTWARE labelgen.php --- text - to - image converter using PHP 
 
 This PHP program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 This PHP program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/



/*
<?php
header("Content-type: image/png");
$PHPtest = @imagecreate(110, 20) or die(" PHP ERROR - Cannot initialize new GD image stream ");
$background_colour = imagecolorallocate($PHPtest, 0, 0, 0);
$text_colour = imagecolorallocate($PHPtest, 233, 14, 91);
imagestring($PHPtest, 1, 5, 5, " TEST Simple Text String ", $text_colour);
imagepng($PHPtest);
imagedestroy($PHPtest);
exit;
?>
*/



// http://chxo.com/labelgen/labelgen.php?z=z&font=ARIAL.TTF&size=20&bgcolor=%23ffffff&textcolor=%230000ff&submit=create+image&textval= http://www.cheapeatsgroup.org/ //



// setup the variables 



//$fontpath= "/";
$fontpath"./";
//$fontpath= "/home/chxo/http/labelgen/";
//$fontpath= "/home/csnyder/files/websites/chxo.com/http/labelgen/";
$font$_REQUEST['font'];
$textval$_REQUEST['textval'];
$size$_REQUEST['size'];             
$rot$_REQUEST['rot'];             
$padding$_REQUEST['padding'];             
$bgcolor$_REQUEST['bgcolor'];
$textcolor$_REQUEST['textcolor'];
$transparent$_REQUEST['transparent'];
$showsource$_REQUEST['showsource'];
$makeIMAGE$_REQUEST['makeIMAGE'];            
$noise$_REQUEST['noise'];            
$z$_REQUEST['z'];            
$y$_REQUEST['y'];            
$random11substr(number_format(time() * rand(),0,'',''),0,10); // random ten digit number //             
$random12substr(number_format(time() * mt_rand(),0,'',''),0,10); // random ten digit number //             
$random21substr(md5(time() * rand()),0,10); // random ten letters/digits number //             
$random22substr(md5(time() * mt_rand()),0,10); // random ten letters/digits number //             
$random31date(ÒymdÓ) . substr(number_format(time() * rand(),0,Ó,Ó),0,4); // date plus random number //             
$random32date(ÒymdÓ) . substr(number_format(time() * mt_rand(),0,Ó,Ó),0,4); // date plus random number //             



// setup the defaults 
//             if ($z=="") $z="z";            
//             if ($y=="") $y="y";            
if ($font==""$font="PALATINO.TTF"// default font type //             
if ($textval==""$textval=" 0123456789 the quick brown dog jumped over the lazy fox @ spammer.com.au ";
if (
$size==""$size12// default font size // 
if ($rot==""$rot 0// image rotation in degrees from the horizontal // 
if ($padding==""$padding3// default padding in pixels around text // 
if ($bgcolor==""$bgcolor"FFFFFF";
if (
$textcolor==""$textcolor"0000FF";
if (
$transparent==""$transparent1// default transparency set to on // 
           
if ($size<7$size7;           
           if (
$rot>360$rot=360;           
           if (
$rot<-360$rot=-360;           
           if (
$padding<3$padding5;           
if (
$size>10$antialias1;           
// if ($size<-1) $antialias= 1;           
else $antialias0;



// create the geometry 
        
$bounds = array();        
$fontfile$fontpath.$font;
$boximageftbbox$size$rot$fontfile$textval$bounds );
$boxwidth$box[4];
$boxheightabs($box[3]) + abs($box[5]);
$width$boxwidth + ($padding*2) + 1;
$height$boxheight + ($padding*2) + 0;
$textx$padding;
$texty= ($boxheight abs($box[3])) + $padding;
//print "$width x $height ($box[4] x ($box[3] - $box[5]))"; exit;

// create the image 
$pdfimagecreate($width$height);

// create the two colors 
function mkcolor($color){
 
// courtesy simon: http://www.php.net/manual/en/function.imagecolorallocate.php#19576 // 
 
global $pdf;
// $whiteBG = imagecolorallocate($pdf, 255, 255, 255); 
// $blackFG = imagecolorallocate($pdf, 0, 0, 0); 
 
$color str_replace("#","",$color);
 
$red hexdec(substr($color,0,2));
 
$green hexdec(substr($color,2,2));
 
$blue hexdec(substr($color,4,2));
 
$out imagecolorallocate($pdf$red$green$blue);
 return(
$out);
 }
$bgmkcolor($bgcolor);
$txmkcolor($textcolor);

// only for PNG and for GIF - to create the background transparency - 
if ($transparent==1) {
 
$tbgimagecolortransparent($pdf$bg);
 }

// setup the antialiasing 
if (!$antialias) {
 
$tx= ($tx);
 }
 
//  setup random numbers  //  
 
if ($y =="y") { 
 
$textval$random12 
 } 
 

// setup the text - for rendering the IMAGE object //         
imagefttext$pdf$size$rot$textx$texty$tx$fontfile$textval$bounds );
// now output the $pdf IMAGE object //         

// POST send only the image GIF 

if ($makeIMAGE=="makeGIF") { 
header("Content-Type: image/gif");
 
imagegif($pdf);
 
imagedestroy($pdf); 
 exit;
 } 

// POST send only the image JPEG 

if ($makeIMAGE=="makeJPEG") { 
header("Content-Type: image/jpeg");
 
imagejpeg($pdf);
 
imagedestroy($pdf); 
 exit;
 } 

// POST send only the image PNG 

if ($makeIMAGE=="makePNG") { 
header("Content-Type: image/png");
 
imagepng($pdf); 
 
imagedestroy($pdf); 
 exit;
 } 

// GET send only the image PNG 

if ($z =="z") { 
header("Content-Type: image/png"); 
 
imagepng($pdf); 
 
imagedestroy($pdf); 
 exit; 
 } 
 

// GET send only the RANDOM NYMBER image PNG 

if ($y =="y") { 
header("Content-Type: image/png"); 
 
imagepng($pdf); 
 
imagedestroy($pdf); 
 exit; 
 } 
 
// GET send only the php source 
 
if ($showsource=="yes") { 
 
imagedestroy($pdf); 
header("Content-Type: text/html; charset=iso-8859-1");
 print 
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <title> FREE ONLINE Your Email Address Text TO Image Converter ( please select - PNG - JPEG - GIF - ) - text2image - text2png - text2jpeg - text2gif - </title>
 </head>
 <body bgcolor="#ffffff" text="#000000" >
 <h1> PHP Source: </h1> ' 
;
 
$sourceshow_source($_SERVER['SCRIPT_FILENAME']);
 print 
" <br> <br> <hr /> 
 If you find this 2003 MODIFIED VERSION SOFTWARE useful, please donate some U.S. Dollars by email via 
 <A HREF='https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_send-outside' TARGET='_blank' > www.PayPal.com </A> <br>
 All Rights Reserved and Copyright (C) 2003 webmaster-AT-purchase-secure.com.au <br>
 2003 MODIFIED VERSION SOFTWARE labelgen.php --- text - to - image converter using PHP <br>
 N.B. Original Copyright (C) 2003 by Chris Snyder (mailto: csnyder -AT- chxo.com) <br>
           http://chxo.com/labelgen/labelgen.php           <br> 
 This PHP program comes with ABSOLUTELY NO WARRANTY. This is free software, 
 and you are welcome to redistribute it under certain conditions; please refer to the 
 <a href='http://www.gnu.org/licenses/gpl.html' TARGET='_blank' >GNU General Public License</a> for details. 
 <br> <hr /> <br> 
 </body>
 </html>
 
 
 
 "
; exit; 
 } 
?>

<?php 

 $fp 
fopen($_SERVER['SCRIPT_FILENAME'], "r"); 
 
$etag md5(serialize(fstat($fp))); 
 
fclose($fp); 

/* header("Content-Type: text/html; charset=iso-8859-1"); */ 
/* header("Pragma: no-cache"); */ 
/* header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1" */ 
/* header("Expires: Fri, 31-Dec-1999 00:00:00 GMT"); // Date in the past */ 
/* header("Response-Expires: -1"); */ 
/* header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); */ 
/* header("MIME-version: 1.0"); */ 
/* header("Etag: ".$etag); */ 
/* header('Server: '); // Hides your server environment information */ 
/* header('X-Powered-By: '); // Hides your server environment information */ 
/* header("Location: http://www.example.com/something.php?a=1"); */ 

/* Redirect to a different page in the current directory that was requested */ 
/* $host = $_SERVER['HTTP_HOST']; */ 
/* $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); */ 
/* $extra = 'colours.php'; */ 
/* header("Location: http://$host$uri/$extra"); */ 
/* exit; */ 

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title> FREE ONLINE Your Email Address Text TO Image Converter ( please select - PNG - JPEG - GIF - ) - text2image - text2png - text2jpeg - text2gif - </title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000DD" alink="#33CC33" vlink="#FF0000" marginwidth="5" marginheight="5" topmargin="5" leftmargin="5" style="padding:11px;margin:11px; font-family: 'Times New Roman'; legend: 'white-space:normal'; "          >         <!-- // onLoad="print();" -->         <basefont size="3" color="#000000" face="Times New Roman,Times">         <a NAME="GoToTopOfPage"></a><a NAME="#"></a><a NAME="top"></a>         
         
<h1> Your Email Address Text TO Image Converter ( please select - PNG - JPEG - GIF - ) <BR> - text2image - text2png - text2jpeg - text2gif - <br />
<img src="/images/images/cheapeatsgroup.png" alt=" CONVERT text to image " /> </h1> 
<p> &nbsp; According to <a href="spamreport.php?" TARGET="_blank" onClick="if(this.blur)this.blur();" >this archived March 2003 published report</a> 
 &nbsp; <a href="/images/images/030319spamreport.Why Am I Getting All This Spam.pdf" TARGET="_blank" onClick="if(this.blur)this.blur();" >file download filetype:pdf version</a> 
 &nbsp; one of the fastest ways to get your email address included in bulk email lists is to post it on your public website. But what if you really need to 
 securely display your email address on your website, so that you can be contacted by email, for legitimate purposes? &nbsp; </p>
<p> The solution is to hide your email address, by the use of a human-readable format that is opaque to the &quot;robots&quot; that scour the internet, text harvesting email addresses. 
 An image is one such format.* This software web page, will immediately create a PNG image file (or choose to create a JPEG image file) (or choose to create a GIF image file) from the text you type, 
 <b> with each image created in a brand new pop-up window. </b> That freshly created image file, can be safely placed onto your website. 
 This software web page <b> will NOT save your email address</b> anywhere on our system. &nbsp; &nbsp; &nbsp; <strong> Generate your image, and use that image to protect your online privacy on your websites. &nbsp; &nbsp; &nbsp; </strong> <BR> 
<BR> &nbsp; This PHP script, provides the means to convert any string of text into an image. This has some simple uses such being able to displaying your text as an image. This can quickly help to reduce the possibility of the text of your email address, being picked up by web crawlers and used for junk mail. </p> 
<p><b> &nbsp; Important Warning: &nbsp; </b> please do NOT make the image into a clickable "mai<B></B>lto:" link or use your email address in clear text within an ALT tag, &nbsp; 
<BR> &nbsp; as that will defeat the whole purpose of using the image to securely mask and completely obscure your email address. &nbsp; <BR> &nbsp; Change the default settings, and then click the button " GENERATE your image ". &nbsp; </p>
    
<form action="labelgen.php?" method="POST" TARGET="_blank" >
<table style="position: relative; left: 30px;">
    <tr>
        <td style="text-align: right;"> &nbsp; type email address text: &nbsp; </td>
        <td><input type="text" name="textval" value=" cheap.eats.group -AT- gmail.com " size="44" maxlength="77" /></td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; choose font type by name: &nbsp; </td>
            <td><select name='font' ><option value='ARIAL.TTF' > Arial </option><option value='Arialn.TTF' > Arial Narrow </option><option value='Caecilia.OTF' > Caecilia </option><option value='COMIC.TTF' > Comic Sans </option><option value='COUR.TTF' > Courier </option><option value='Frutiger.TTF' > Frutiger </option><option value='GARAMOND.TTF' > Garamond </option><option value='GEORGIA.TTF' > Georgia </option><option SELECTED value='PALATINO.TTF' > Palatino </option><option value='TAHOMA.TTF' > Tahoma </option><option value='TIMES.TTF' > Times New Roman </option><option value='VERDANA.TTF' > Verdana </option><option value='AVGARDD.TTF' > AvantGarde </option><option value='MYRIADB.TTF' > Myriad </option><option value='TYPEWR.TTF' > Typewriter </option><option value='Courier.dfont' > Courier </option><option value='Helvetica.dfont' > Helvetica </option><option value='LucidaGrande.dfont' > LucidaGrande </option><option value='Symbol.dfont' > Symbol </option><option value='unifont.ttf' > UNICODE FONT </option></select> &nbsp; (please scroll down to see samples in font size 12px) &nbsp; </td>            
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; (pixels) choose font size: &nbsp; </td>
        <td><input type="text" name="size" value="12" size="5" maxlength="2" /> ... 12 pixels equals 20 height ... </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; (degrees) choose image rotation: &nbsp; </td>
        <td><input type="text" name="rot" value="0" size="5" maxlength="4" /> ... 0 (horizontal) ... 90 (vertical) ... 45 (diagonal) ... </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; (number) choose image padding: &nbsp; </td>
        <td><input type="text" name="padding" value="5" size="5" maxlength="2" /> ... increase empty space around the image ... </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; choose text color: &nbsp; </td>
        <td><input type="text" name="textcolor" value="#0000FF" size="7" maxlength="7" /></td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; choose background color: &nbsp; </td>
        <td><input type="text" name="bgcolor" value="#ffffff" size="7" maxlength="7" /> &nbsp; &nbsp; &nbsp; <a href="colours.php?" TARGET="_blank" >hex-codes color chart picker</a> &nbsp; &nbsp; &nbsp; </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; transparent: &nbsp; </td>
        <td><input CHECKED type="checkbox" name="transparent" value="1" /> &nbsp; GIF transparent background --- PNG transparent background *** &nbsp; </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; image-noise: &nbsp; </td>
        <td><input CHECKED type="checkbox" name="noise" value="1" /> &nbsp; Tick the box to increase image noise levels, to further deter text harvesting &nbsp; </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; choose image filetype: &nbsp; </td>
        <td><input CHECKED type="radio" name="makeIMAGE" value="makePNG" /> &nbsp; create PNG image &nbsp; <input type="radio" name="makeIMAGE" value="makeJPEG" /> &nbsp; create JPEG image &nbsp; <input type="radio" name="makeIMAGE" value="makeGIF" /> &nbsp; create GIF image &nbsp; </td>
    </tr>
    <tr>
        <td style="text-align: right;"> &nbsp; &nbsp; </td>
        <td><br /><input type="hidden" name="labelgen" value="labelgen" /> &nbsp; <input type="submit" name="submit" value=" GENERATE your image " /> &nbsp; &nbsp; &nbsp; <a href="labelgen.php?showsource=yes" TARGET="_blank" >show webpage php source code</a> &nbsp; </td>
    </tr>
</table>
 <p> N.B. as all images will not be readable in text-only browsers, OR by visually impaired people, THEREFORE an image file of your email address, is a less-than-perfect solution to the spam problem. &nbsp; &nbsp; &nbsp; </p>
 <p> F.Y.I. - The generated image can also be made as a CAPTCHA IMAGE, so that those new advanced spambots still remain unable to read the text content of the image. &nbsp; &nbsp; &nbsp; </p>
 <p> *** transparent background PNG images are supported by all current versions of internet browsers, since 2001 *** </p> 
 <p> If you find this 2003 MODIFIED VERSION SOFTWARE useful, please donate some U.S. Dollars by email via 
 <A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/mc/mc_send-outside" TARGET="_blank" > www.PayPal.com </A> <br> </p> 

</form>
            
<hr />
<hr />
<hr />
            
<table>

<CAPTION> <h2> <B> <CENTER> Font Samples </CENTER> </B> </h2> </CAPTION>

<tr><td> Arial </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=ARIAL.TTF" alt='Arial sample' /></td></tr>

<tr><td> Arial Narrow </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Arialn.TTF" alt='Arial Narrow sample' /></td></tr>

<tr><td> Caecilia </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Caecilia.OTF" alt="Caecilia sample" /></td></tr>

<tr><td> Comic Sans </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=COMIC.TTF" alt='Comic Sans sample' /></td></tr>

<tr><td> Courier </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=COUR.TTF" alt='Courier sample' /></td></tr>

<tr><td> Frutiger </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Frutiger.TTF" alt='Frutiger sample' /></td></tr>

<tr><td> Garamond </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=GARAMOND.TTF" alt='Garamond sample' /></td></tr>

<tr><td> Georgia </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=GEORGIA.TTF" alt='Georgia sample' /></td></tr>

<tr><td> Palatino </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=PALATINO.TTF" alt='Palatino sample' /></td></tr>

<tr><td> Tahoma </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=TAHOMA.TTF" alt='Tahoma sample' /></td></tr>

<tr><td> Times New Roman </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=TIMES.TTF" alt='Times New Roman sample' /></td></tr>

<tr><td> Verdana </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=VERDANA.TTF" alt='Verdana sample' /></td></tr>

            <tr><td> AvantGarde </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=AVGARDD.TTF" alt='AvantGarde sample' /></td></tr>

            <tr><td> Myriad </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=MYRIADB.TTF" alt='Myriad sample' /></td></tr>

            <tr><td> Typewriter </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=TYPEWR.TTF" alt='Typewriter sample' /></td></tr>

            <tr><td> Courier </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Courier.dfont" alt='Courier SAMPLE' /></td></tr>

            <tr><td> Helvetica </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Helvetica.dfont" alt='Helvetica SAMPLE' /></td></tr>

            <tr><td> LucidaGrande </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=LucidaGrande.dfont" alt='LucidaGrande SAMPLE' /></td></tr>

            <tr><td> Symbol </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=Symbol.dfont" alt='Symbol SAMPLE' /></td></tr>

            <tr><td> UNICODE GNU </td><td> &nbsp; &nbsp; &nbsp; <img src="labelgen.php?z=z&font=unifont.ttf" alt='UNICODE GNU sample font' /></td></tr>

            
            

<!-- 
 -->           

            
            

</table>
            
<BR><BR>
            
            
            
<div style="margin:0 auto;height:1px;width:1980px;" > </div>
</body>
</html>

            
            

<!-- 
 -->           

            
            






If you find this 2003 MODIFIED VERSION SOFTWARE useful, please donate some U.S. Dollars by email via www.PayPal.com
All Rights Reserved and Copyright (C) 2003 webmaster-AT-purchase-secure.com.au
2003 MODIFIED VERSION SOFTWARE labelgen.php --- text - to - image converter using PHP
N.B. Original Copyright (C) 2003 by Chris Snyder (mailto: csnyder -AT- chxo.com)
http://chxo.com/labelgen/labelgen.php
This PHP program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; please refer to the GNU General Public License for details.