php - Codeigniter 3.0 captcha 404 -


i have problem helper captcha in codeigniter (3.0). captcha work in logs is:

error - 2016-09-22 08:32:25 --> 404 page not found: [207.46.xxx.xxx] > /upload/captcha/1470072358.0468.jpg 

and every day ~100 errors.

where problem?

my controller:

$random_number = substr(number_format(time() * rand(), 0, '', ''), 0, 6);         // setting captcha config         $vals = array(             'word'       => $random_number,             'img_path'   => './upload/captcha/',             'img_url'    => base_url() . 'upload/captcha/',             'img_width'  => 140,             'img_height' => 32,             'expiration' => 7200,             'pool'       => '0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz',             'colors'     => array(                 'background' => array(255, 255, 255),                 'border'     => array(255, 255, 255),                 'text'       => array(111, 34, 45),                 'grid'       => array(255, 40, 40),             ),             'font_path'  => base_url() . 'system/fonts/texb.ttf',         );         $data            = array();         $data['captcha'] = create_captcha($vals);         $this->session->set_userdata('captchaword', $data['captcha']['word']);         $this->view_data['captcha'] = create_captcha($vals); 

a program use human verification or program protect websites against bots, spam etc. captcha contain image human challenge on forms human read , enter captcha image text. in codeigniter can add captcha website using captcha helper class. it’s provided codeigniter default. in article how use captcha in codeigniter using session , callback function validate captcha field/words. there alternate can manage captcha database using session simple way manage. below sharing example how use captcha in codeigniter website forms.

  1. create directory on root named “captcha”(must writable).

  2. create controller named “captcha. php” under “application/controllers/”

  3. create view file named “captcha.php” under “application/views/” , add below code.

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -