Código PHP:
class c_funciones
{
function __construct()
{
}
function f_captcha($length) {
$pattern = "1234567890abcdefghijklmnopqrstuvwxyz";
for($i=0;$i<$length;$i++) {
$key .= $pattern{rand(0,35)};
}
return $key;
}
Código PHP:
include_once('../class/c_funciones.php');
$o_funciones=new c_funciones;
$tmptxt=$o_funciones->f_captcha(8);
$_SESSION['tmptxt'] =$tmptxt;
$captcha = imagecreatefromgif("bgcaptcha.gif");
$colText = imagecolorallocate($captcha, 0, 0, 0);
imagestring($captcha, 5, 16, 7, $_SESSION['tmptxt'], $colText);
header("Content-type: image/gif");
imagegif($captcha);
<img src="captcha.php" width="100" height="25" >
como les indico me funcioan en forma local pero en el server no sale la imagen
cual es el problema.??
Saludos
Fernando