<?php
function imagettftextoutline(&$im,$size,$angle,$x,$y,&$col,
            &$outlinecol,$fontfile,$text,$width) {

    for ($xc=$x-abs($width);$xc<=$x+abs($width);$xc++) {
 
        for ($yc=$y-abs($width);$yc<=$y+abs($width);$yc++) {

            $text1 = imagettftext($im,$size,$angle,$xc,$yc,$outlinecol,$fontfile,$text);
        }
    }
    // Draw the main text
    $text2 = imagettftext($im,$size,$angle,$x,$y,$col,$fontfile,$text);
}
header( "Content-type: image/png" );
$im = imagecreatefrompng( "orange.PNG" );
$text = htmlspecialchars( $_GET ['t'] );
$font = "volterb.ttf";
$fontsize = 7;
$white = imagecolorallocate( $im, 0xFF, 0xFF, 0xFF );
$red = imagecolorallocate( $im, 223, 143, 38 );
$size = imagettfbbox($fontsize, 0, $font, $text);
$dx = (imagesx($im)) - (abs($size[2]-$size[0])) - 20;
imagettftextoutline($im,7,0,12,15,$white,$red,$font,$text,1);
imagepng( $im );
imagedestroy( $im );
?>