I made the changes I suggested and it runs on my server with my image:

http://www.keeline.com/marc.php

Here is the code as I have it:

<?php
        ini_set('display_errors', 1);
        error_reporting(E_ALL);
        header("Content-type: image/png");
        $img_handle = imagecreatefrompng("KnottsCableCarPostcard-1024.png");
        $color = imagecolorallocate($img_handle, 100, 100, 100);
        $ip = $_SERVER["REMOTE_ADDR"];
        imagestring($img_handle, 3, 10, 9, "Wade's IP: $ip", $color);
        imagepng($img_handle);
        imagedestroy($img_handle);
?>

Once you have it working, I'd comment out the ini_set() and error_reporting()
functions.  You will probably want to check to see that the image you are
marking even exists and that it is an image.

James

Reply via email to