function genHtml($class, $id) { require_once __DIR__ . '/hn_captcha/hn_captcha.class.php'; $captcha = new hn_captcha($this->captcha_init, TRUE); $captcha->make_captcha(); $_SESSION['library']['php']['form']['standard']['captcha'][$this->name]['public_key'] = $captcha->public_key; return ' <img src="' . BASE_URL . $captcha->get_filename_url() . '" alt="Captcha"/><br /> <input id="' . $id . '" type="text" name="' . $this->name . '" /> '; //<input type="hidden" name="'.$this->name.'_captcha_key" value="'.$captcha->public_key.'" />'; }