Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/05/2010, 07:45
jiten
 
Fecha de Ingreso: febrero-2008
Mensajes: 409
Antigüedad: 18 años, 8 meses
Puntos: 2
Pregunta Respuesta: Hosting Gratis de Godaddy tiene GD activo pero...

Cita:
Iniciado por bet7o Ver Mensaje
si le mandas las cabeceras?
No entiendo a que te refieres.. mira, este es e mi codigo :

Código PHP:
<?
require_once("mf.php");
fnSessionStart();

$RandomStr = md5(microtime());// md5 to generate the random string

$ResultStr = strtoupper(substr($RandomStr,0,5));//trim 5 digit 

$NewImage =imagecreatefromjpeg("base.jpg");//image create by existing image and as back ground 

$LineColor = imagecolorallocate($NewImage,233,239,239);//line color 
$TextColor = imagecolorallocate($NewImage, 163, 148, 148);//text color-white

imageline($NewImage,0,0,40,40,$LineColor);//create line 1 on image 
imageline($NewImage,40,0,80,40,$LineColor);//create line 1 on image 
imageline($NewImage,80,0,120,40,$LineColor);//create line 2 on image 
imageline($NewImage,120,0,160,40,$LineColor);//create line 2 on image 
imageline($NewImage,160,0,200,40,$LineColor);//create line 1 on image 


$font = 'stampa.ttf';

imagettftext($NewImage, 16, 0, 63, 30, $TextColor, $font, $ResultStr); 

$_SESSION['key'] = $ResultStr;// carry the data through session

header("Content-type: image/jpeg");// out out the image 

imagejpeg($NewImage);//Output image to browser 
?>