zackcez Posted June 5, 2009 Share Posted June 5, 2009 <?PHP header("Content-type: image/png"); $msn = $_GET['a']; $msn = str_replace(".png", "", $msn); $Back = "background.png"; $Back2 = "background2.png"; $Font = "font.ttf"; $Size = getimagesize($Background); $img = imagecreatetruecolor($Size[0], $Size[1]); $imgBack = imagecreatefrompng($Background); $Green = imagecolorallocate($img, 0, 255, 51); $contents = ''; $handle = fopen("http://www.checkmsnstatus.com/msn-status-checker.php?msn=$msn&check=Check+Status","r"); if($handle){ while (!feof($handle)) { $contents .= fread($handle, 8192);} fclose($handle);} if (stristr($contents, ">Online<")) { $imgBack = imagecreatefrompng($Back); imagecopy($img, $imgBack, 0, 0, 0, 0, $Size[0], $Size[1]); imagettftext($img, 10, 0, 5, 19, 0, $Font, $msn); imagettftext($img, 10, 0, 225, 19, $Green, $Font, "Online"); } else { $imgBack = imagecreatefrompng($Back2); imagecopy($img, $imgBack, 0, 0, 0, 0, $Size[0], $Size[1]); imagettftext($img, 10, 0, 5, 19, 0, $Font, $msn); imagettftext($img, 10, 0, 225, 19, 0, $Font, "Offline"); } imagepng($img); imagedestroy($img); ?> The image “http://127.0.0.1/msn.php?a=mickvickfan@hotmail.com.png” cannot be displayed, because it contains errors. Help is appreciated Quote Link to comment https://forums.phpfreaks.com/topic/160999-solved-php-gd-error/ Share on other sites More sharing options...
RussellReal Posted June 5, 2009 Share Posted June 5, 2009 what're you tryna do..? it could be you didn't uncomment the gd package in your php ini.. it usually comes quoted out in php downloads Quote Link to comment https://forums.phpfreaks.com/topic/160999-solved-php-gd-error/#findComment-849674 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.