Jump to content

[SOLVED] Captcha Problem...


darkfreaks

Recommended Posts

if i put the header back in jesi i get

 

Cannot modify header information - headers already sent by (output started at /home/lilysgra/public_html/lilysgraveyard/index.php:27)

 

^OBV

 

it goes away when i take it out.

 

 

 

Bleh i got a better captcha it had tons of errors in it.

 

 

but it works but it wont read the .tff monofont file?

 

the error code in php is

 

<?php

var $font = 'monofont.ttf';

/* create textbox and add text */
      $textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function');
      $x = ($width - $textbox[4])/2;
      $y = ($height - $textbox[5])/2;
      imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function');
      /* output captcha image to browser */
      header('Content-Type: image/jpeg');
      imagejpeg($image);
      imagedestroy($image);
      $_SESSION['security_code'] = $code;
   }

}

$width = isset($_GET['width']) && $_GET['height'] < 600 ? $_GET['width'] : '120';
$height = isset($_GET['height']) && $_GET['height'] < 200 ? $_GET['height'] : '40';
$characters = isset($_GET['characters']) && $_GET['characters'] > 2 ? $_GET['characters'] : '6';

$captcha = new CaptchaSecurityImages($width,$height,$characters);

?>


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.