<?php
function imagettftextoutline(&$im,$size,$angle,$x,$y,&$col,
            &$outlinecol,$fontfile,$text,$width) {
    // For every X pixel to the left and the right
    for ($xc=$x-abs($width);$xc<=$x+abs($width);$xc++) {
        // For every Y pixel to the top and the bottom
        for ($yc=$y-abs($width);$yc<=$y+abs($width);$yc++) {
            // Draw the text in the outline color
            $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( "header_blank.png" );
$text = htmlspecialchars( $_GET ['t'] );
$font = "volterb.ttf";
$fontsize = 7;
$white = imagecolorallocate( $im, 0xFC, 0xFC, 0xFC );
$blue = imagecolorallocate( $im, 0x79, 0xC9, 0xE3 );
$black = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$size = imagettfbbox($fontsize, 0, $font, $text); //calculate the pixel of the string
$dx = (imagesx($im)) - (abs($size[2]-$size[0])) - 20; //calculate the location to start the text
imagettftextoutline($im,$fontsize,0,1,10,$white,$blue,$font,$text,1);
imagecolortransparent($im, $black);
imagepng( $im );
imagedestroy( $im );
?>