View Single Post
Old 12-26-2008, 10:48 AM   #1 (permalink)
tego10122
The Contributor
 
tego10122's Avatar
 
Join Date: Sep 2008
Location: Miami
Posts: 39
Thanks: 7
tego10122 is on a distinguished road
Default ARRGH! GD!!!!!!!!! help..

PHP Code:
    class image
    
{
        public function 
text($variable)
        {
            
$image imagecreate(200,25);

            
imagecolorallocate($image255255255);

            
$fontColor imagecolorallocate($image000);

            
$startX     15;
            
$startY     5;
            
$string "$variable";
            
imagestring($image3$startX$startY$string$fontColor);
            
header("Content-type: image/jpeg");
            
imagejpeg($image);
            
imagedestroy($image);
        }
    }
    
$image = new image(); 
When ever I do
PHP Code:
<?=$image->text('user@email.com');?>
I get
PHP Code:
WarningCannot modify header information headers already sent by (output started at C:\DIR:3in C:\class.php on line 65
&#65533;JFIF�������>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality �C�      $.' ",#(7),01444'9=82<.342�C   2!!22222222222222222222222222222222222222222222222222���"������������  ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������  ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz� ��?�(+G;p}3z隱^?ĺ΁]bm‚xi$M6nڨY?WcdnX;}v_J^9Ѽ|Q9-)) @Eq _z^wl\eո]P9*ԞNTN+ ( ( ( ( ( ( ( ( ( ( n*巸9  I]H#TP h*$YΖ$§+ ';W+r(�(�(�(�(�(�(�(�(�(�(�( 
__________________
You're Everyday Graphic Artist
Twitter|GigPark|Linked In
Send a message via MSN to tego10122
tego10122 is offline  
Reply With Quote