Jump to content

php images


marklarah

Recommended Posts

im running php 5. something, so the gd library is installed (I also checked using that echo thingy).

 

Anyway, i've tried like 50 million tutorials, even this one (which is directly cmd+v'd, so it should work???

<?

Header ("Content-type: image/png");

$img_handle = imageCreateFromPNG("http://www.icemelon.com/images/tutorials/bannerboy.png");

$color = ImageColorAllocate ($img_handle, 100, 100, 100);

$ip = $_SERVER['REMOTE_ADDR'];

ImageString ($img_handle, 3, 10, 9,  "Your IP: $ip", $color);

ImagePng ($img_handle);

ImageDestroy ($img_handle);

?>

 

 

Anyone know why it isn't working for me? In safari, i just get the invalid image, and in Mozzila, it says

The image “http://disturbedpickle.com/img.php” cannot be displayed, because it contains errors.

 

???

 

Link to comment
https://forums.phpfreaks.com/topic/98710-php-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.