[eluser]7amza[/eluser]
hey everyone ,
i tried to use reCapatcha in my app , but i'm getting this error :
Unable to load the requested file: recaptcha.php
that's what i did :
a part of controller:
Code:
function Add()
{
//setting
$data['setting'] = $this->gadget->getSetting();
//categories
$data['categories'] = $this->site->getCategories();
//pages
$data['pages'] = $this->gadget->getPages();
//adsenses
$data['adsenses'] = $this->gadget->getAdsenses();
//blocks
$data['blocks'] = $this->gadget->getBlocks();
//sites
//load helpers
$this->load->helper('form');
//load lbraries
$this->load->library('recaptcha');
$this->load->library('form_validation');
$this->lang->load('recaptcha');
//Set form validation rules
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
$this->form_validation->set_rules('site_title', 'Site title', 'trim|min_length[3]|max_length[20]|required');
$this->form_validation->set_rules('site_source', 'Site url', 'prep_url|required|trim|min_length[12]');
$this->form_validation->set_rules('site_keywords', 'keywords', 'required|trim|min_length[10]');
$this->form_validation->set_rules('site_description', 'descriptio', 'trim|required|min_length[15]');
$this->form_validation->set_rules('recaptcha_response_field', 'Capatcha', 'required|callback_check_captcha');
$data['captcha'] = $this->recaptcha->recaptcha_get_html();
if ($this->form_validation->run() == FALSE)
{
//load views
$this->load->view('header',$data);
$this->load->view('menu');
$this->load->view('addsite',$data);
$this->load->view('footer',$data);
}
config/recaptcha.php
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['recaptcha'] = array(
'public'=>'i put my public key her',
'private'=>'i put my private key her',
'RECAPTCHA_API_SERVER' =>'http://api.recaptcha.net',
'RECAPTCHA_API_SECURE_SERVER'=>'https://api-secure.recaptcha.net',
'RECAPTCHA_VERIFY_SERVER' =>'api-verify.recaptcha.net',
'theme' => 'red'
);
the libraries/recaptcha.php code :
http://www.antiteori.com/recaptcha-codeigniter-library/
so can anyone help me ?