<?PHP
$this->set['fontName'] = 'ChampagneAndLimousines'; // preferred TTF font
$this->set['fontSize'] = 30; // preferred font size
$this->set['fontColor'] = 6; // preferred font color
$this->set['userKey'] = md5('cftextimage'); // md5 sign of parameters
?>
<img alt="Hello World" title="Hello World" src="./cftextimage/cftextimage.class.php?text=Hello+World&size=25&font=LaurenScript&color=3aa3ff&a=8a3b93b3fc699ab34644e5e376a8df5a" />
<?php
// your user key
$userkey = md5('cftextimage');
// returns parameters
function imgParams($text, $size=null, $font=null,$color=null){
global $userkey;
$p = '?text='.urlencode($text).
(!is_null($font)?'&size='.$size:'').
(!is_null($font)?'&font='.$font:'').
(!is_null($color)?'&color='.$color:'').
'&a=';
return $p.md5($userkey.$text.$size.$color.$font);
}
?>
<img src="./cftextimage/cftextimage.class.php<?php echo imgParams('Hello World', 25, 'LaurenScript','3aa3ff');?>" title="Hello World" alt="Hello World">
<?PHP
include './cftextimage/cftextimage.class.php';
$img = new imageText();
$img->imageSettings('example 2', 25,null,'3aa3ff');
echo $img->makeImage('html');
?>
<img title="example 2" alt="example 2" src="http://www.codefuture.co.uk/projects/textimage/cftextimage/cache/1a6ce7e8d511fc2e4ed1beec915bfeb2.png">
<?PHP
include './cftextimage/cftextimage.class.php';
$img = new imageText();
$img->imageSettings('example 3', 25,'ChampagneAndLimousines','3aa3ff');
$im = $img->makeImage('resource');
$im = imagerotate($im, $degrees, 0);
imagealphablending($im, true);
imagesavealpha($im, true);
header('Content-type: image/png');
imagepng($im,'textimage.png');
?>