Skip to content
This repository
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 22 lines (15 sloc) 0.641 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php

header ("Content-type: image/png");

$width = 15;
$height = 200;

// imagecreate (x width, y width)
$img_handle = @imagecreatetruecolor ( $width, $height ) or die ("Cannot Create image");

// ImageColorAllocate (image, red, green, blue)
$back_color = ImageColorAllocate ( $img_handle, 0, 0, 0 );
$txt_color = ImageColorAllocate ( $img_handle, 0, 0, 1 );

imagefill( $img_handle, $width, $height, $back_color );
imagecolortransparent( $img_handle, $back_color );
ImageStringUp ( $img_handle, 2, 1, 195, $_GET['text'], $txt_color );

ImagePng ( $img_handle );
ImageDestroy( $img_handle );

?>
Something went wrong with that request. Please try again.