NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Whats wrong with this GD?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-23-2006, 11:10 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Whats wrong with this GD?


edit2: fixed, and I dont know why, lol.

----- original post -----
edit: I have found the problem, its not sending the header, any ideas why?

----- original post -----

I just get this:
Code:
The image “http://localhost:1024/home/images/online.php” cannot be displayed, because it contains errors.

Here is my code:
PHP Code:
<?php

header
("Content-type: image/gif")or die("Could not send header.");
putenv('GDFONTPATH=' realpath('.'))or die("Could not set environmental variable.");

$text = array();
$text[0] = 'Server Software: Abyss Web Server X1';
$text[1] = 'Server Uptime: ' $_SERVER['X_ABYSS_STATS_SERVER_UPTIME'];
????: NamePros.com http://www.namepros.com/programming/230775-whats-wrong-with-this-gd.html
$text[2] = 'Server Output: ' $_SERVER['X_ABYSS_STATS_SERVER_OUTPUT'] . ' bytes';

$image = array();
$image['font_size'] = 10;
$image['font_angle'] = 0;
????: NamePros.com http://www.namepros.com/showthread.php?t=230775
$image['font_file'] = 'trebuchet_ms';
$image['text_x'] = 10;
$image['text_y'] = 10;
$image['text_colour'] = imagecolorallocate($im132851)or die("Could not allocate text colour.");

$im imagecreatefromgif("images/online.gif")or die("Could not initialize GD stream");

$y $image['text_y'];

foreach(
$text as $line){
    
imagettftext($im$image['font_size'], $image['font_angle'], $image['font_x'], $y$image['text_colour'], $image['font_file'], $line)or die("Could not append text to image");
    
$y $y 15;
}

imagegif($im)or die("Could not send image.");
imagedestroy($im)or die("Could not destroy image");

?>
Last edited by Mikor; 08-23-2006 at 11:25 AM.
Barrucadu is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:12 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger