<?php
$ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
header ("Content-type: image/png");
$im = @ImageCreateFromPNG ("php.png");
if(!$im) {
$len = 8*(strlen($ip))+6;
$hig = 16;
$img_handle = ImageCreate ($len, $hig) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 0, 0);
$txt_color = ImageColorAllocate ($img_handle, 255, 255, 255);
ImageString ($img_handle, 3, 5, 1, "$ip", $txt_color);
ImagePng ($img_handle); }
?>