//The Canvas for our dynamic image!
//It is set 250x60
$img = imagecreate( 250, 60 );
//The color's are in rgb converted to hex.
$background = imagecolorallocate( $img, 102, 102, 102 );
$textcolour = imagecolorallocate( $img, 85, 238, 170 );
$linecolour = imagecolorallocate( $img, 128, 255, 0 );
//Prints The Text ColdPatch Says:
imagestring( $img, 4, 4, 4, "ColdPatch Says:",
$text_colour );
//Prints The Text Hello NGU
imagestring( $img, 4, 30, 25, "Hello NGU",
$textcolour );
//Sets The Thickness Of the Line
imagesetthickness ( $img, 5 );
//Draws the Line
imageline( $img, 30, 45, 220, 45, $linecolour );
//Sets The header to by the image.
header( "Content-type: image/png" );
//Draws The image
imagepng( $img );
//Locates The Colors.
imagecolordeallocate( $linecolor );
imagecolordeallocate( $textcolor );
imagecolordeallocate( $background );
//Makes Sure Image Gets Deleted to prevents vps/host crashs(rarely).
imagedestroy( $my_img );
Copyright © 2026, NextGenUpdate.
All Rights Reserved.