Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/07/2013, 14:01
Avatar de JessicaTJ
JessicaTJ
 
Fecha de Ingreso: enero-2007
Ubicación: 127.0.0.1
Mensajes: 472
Antigüedad: 17 años, 3 meses
Puntos: 25
Cambiar fuente en captcha

Hola chicos, estaba viendo este codigo:

Código PHP:
Ver original
  1. function randomText($length) {
  2.     $pattern = "1234567890abcdefghijklmnopqrstuvwxyz";
  3.     for($i=0;$i<$length;$i++) {
  4.       $key .= $pattern{rand(0,35)};
  5.     }
  6.     return $key;
  7. }
  8.  
  9. $_SESSION['tmptxt'] = randomText(5);
  10. $captcha = imagecreatefromgif("images/bgcaptcha.gif");
  11. $colText = imagecolorallocate($captcha, 255, 255, 255);
  12. imagestring($captcha, 5, 30, 7, $_SESSION['tmptxt'], $colText);
  13.  
  14. header("Content-type: image/gif");
  15. imagegif($captcha);

Y no recuerdo bien como hacer el cambio para que tome un archivo TTF como fuente principal, alguna pista de como hacerlo disculpen?
__________________
٩(͡๏̯͡๏)۶ || ٩(͡๏̯͡๏)۶