Location: PHPKode > scripts > ATextImage > atextimage/formimage.php
<?php
require "class.atextimage.php";
$timg = new ATextImage();
$fnt=($_REQUEST['fnt'])?$_REQUEST['fnt']:"arial.ttf";
if($_REQUEST["txt"]){
// $txt=$_REQUEST['txt'];
 $txt=stripslashes($_REQUEST['txt']);
 $tx=explode("\n",$txt);
 foreach($tx as $t)
 {
 $timg->AddLine($t);
 }
}
$di=$_REQUEST['di'];
$fm=$_REQUEST['fm'];
$si=(isset($_REQUEST['si']))?$_REQUEST['si']:"no";       //save image to atest.png?
$wd=(isset($_REQUEST['wd']))?$_REQUEST['wd']:NULL;       //width of blank image
$ht=(isset($_REQUEST['ht']))?$_REQUEST['ht']:NULL;       //height of blank image
$tr=(isset($_REQUEST['tr']))?$_REQUEST['tr']:0;         //text red color
$tb=(isset($_REQUEST['tb']))?$_REQUEST['tb']:255;         //text blue color
$tg=(isset($_REQUEST['tg']))?$_REQUEST['tg']:0;         //text green color
$img=(isset($_REQUEST['img']))?$_REQUEST['img']:""; 
$just=(isset($_REQUEST['j']))?$_REQUEST['j']:"center";
$horz=(isset($_REQUEST['h']))?$_REQUEST['h']:"center";
$vert=(isset($_REQUEST['v']))?$_REQUEST['v']:"center";
$sz=(isset($_REQUEST['sz']))?$_REQUEST['sz']:12;
$border=$_REQUEST['b'];
$basead="";
//$basead=addslashes(dirname(__FILE__));
$timg->SetFont($fnt,$sz);
$timg->SetBackground(255,255,255);
$timg->SetTextColor($tr,$tg,$tb);
if($border=="1")$timg->SetBorder(0,0,0);
$timg->SetPos($horz,$vert,$just);       // (horizontal,vertical) positions
$timg->CreateImage($basead.$img);
$timg->MakeImage($wd,$ht);

if($fm == "png"){
($si=="yes")?$timg->ShowPng('atest.png',$di):$timg->ShowPng();
}
if($fm == "jpg"){
($si=="yes")?$timg->ShowJpg('atest.jpg',$di):$timg->ShowJpg();
}
if($fm == "gif"){
($si=="yes")?$timg->ShowGif('atest.gif',$di):$timg->ShowGif();
}
?>

Return current item: ATextImage