<?php
header("Content-type: image/png");
$user = $_SERVER['REMOTE_ADDR'];
$browser = $_SERVER['HTTP_USER_AGENT'];
$port = $_SERVER['REMOTE_PORT'];
$date = date("F j, Y, g:i a");
$im = imagecreatefrompng("blabla.png");
$user_width = imagettfbbox(9, 0, "tahoma.ttf", $user);
$x_value = (400 - ($user_width[2] + 120));
$color = imagecolorallocate($im, 165, 164, 164);
$color2 = imagecolorallocate($im, 45, 164, 164);
imagettftext($im, 18, 0, 210, 145, $color2, "tahoma.ttf", "$user:$port");
imagettftext($im, 6, 0, 140, 185, $color, "tahoma.ttf", $browser);
if( $user == "127.0.0.1" )
{
imagettftext($im, 9, 0, 220, 165, $color, "tahoma.ttf", "Halo Reza Yang Keren!!");
}
else
{
imagettftext($im, 9, 0, 220, 165, $color, "tahoma.ttf", $date);
}
imagepng($im);
imagedestroy($im);
?>