Welcome Guest, Not a member yet? Register   Sign In
Captcha error word_length
#2

Don't comment out the 'word' string inside the array. You can put the string with no value, or NULL value. Try something like this:

$vals = [
'word' => NULL,
'img_path' => CAPTCHA_IMG_PATH,
'img_url' => site_url('publico/imagens/captcha'),
'img_width' => '150',
'img_height' => '30',
'font_path' => FONTS_PATH . 'ArialMTRegular.ttf',
'expiration' => $this->config->item('captcha_expiration', 'captcha'),
'word_length' => 6,
'font_size' => 14,
'img_id' => 'captcha-image',
'img_alt' => 'failed-to-captcha-image',
'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'colors' => [
'background' => array(255, 255, 255),
'border' => array(255, 255, 255),
'text' => array(255, 120, 120),
'grid' => array(255, 182, 182)
]
];
$cap = create_captcha($vals);
echo $cap['image'];
Reply


Messages In This Thread
Captcha error word_length - by msheath - 06-26-2016, 02:24 PM
RE: Captcha error word_length - by BabalooAye - 07-08-2016, 05:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB