<?php
// Dosya Türü
header("Content-type: image/png");

// Resim oluşturuluyor
$im = imagecreatetruecolor(400, 30);

// Renkler oluşturuluyor
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);

// Yazı yazılıyor
$text = 'Deneme...';

// Font seçiliyor
$font = 'arial.ttf';

// Yazıya gölge ekleneiyor
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);

// Resim üzerine yazı ekleniyor
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>
Veya Resme ip adresi yazdırabilirsin

<?
$imgurl "resim.pn";
header ("Content-type: image/png");
$img_handle = imageCreateFromPNG($imgurl);
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$ip = $_SERVER['REMOTE_ADDR'];
ImageString ($img_handle, 20, 60, 20, "$ip", $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>