marklarah Posted March 30, 2008 Share Posted March 30, 2008 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 More sharing options...
marklarah Posted March 30, 2008 Author Share Posted March 30, 2008 is there something that needs to be enabled or what? Link to comment https://forums.phpfreaks.com/topic/98710-php-images/#findComment-505148 Share on other sites More sharing options...
ridiculous Posted March 30, 2008 Share Posted March 30, 2008 Look at what you typed. The image you are trying to view has the extension .php instead of .png. You'll need to fix that to get the image to display correctly. Link to comment https://forums.phpfreaks.com/topic/98710-php-images/#findComment-505173 Share on other sites More sharing options...
marklarah Posted March 31, 2008 Author Share Posted March 31, 2008 Look at what you typed. The image you are trying to view has the extension .php instead of .png. You'll need to fix that to get the image to display correctly. .....boy.png"); surely thats png!!? Link to comment https://forums.phpfreaks.com/topic/98710-php-images/#findComment-505415 Share on other sites More sharing options...
Coreye Posted March 31, 2008 Share Posted March 31, 2008 I just tried that script, I'm using PHP 5.2.5 and it works fine. Link to comment https://forums.phpfreaks.com/topic/98710-php-images/#findComment-505473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.