function load($options = array(), $input = '') { // Call the parent class load method (includes necessary files) CaptchaLib::load(); // ConfigArray $CAPTCHA_INIT = array('tempfolder' => str_replace("\\", "/", $this->getImagePath()) . '/', 'TTF_folder' => $this->getFontPath() . '/', 'TTF_RANGE' => array('FreeSans.ttf', 'FreeSerif.ttf'), 'chars' => (int) $options['chars'], 'minsize' => (int) $options['minsize'], 'maxsize' => (int) $options['maxsize'], 'maxrotation' => (int) $options['maxrotation'], 'noise' => $options['noise'] == '1' ? true : false, 'websafecolors' => $options['websafecolors'] == '1' ? true : false, 'refreshlink' => TRUE, 'lang' => 'en', 'maxtry' => 3, 'badguys_url' => '/', 'secretstring' => $options['secretstring'], 'secretposition' => (int) $options['secretposition'], 'debug' => FALSE, 'counter_filename' => '', 'prefix' => 'hn_captcha_', 'collect_garbage_after' => (int) $options['collect_garbage_after'], 'maxlifetime' => (int) $options['maxlifetime']); if (!isset($this->object)) { $_POST['hncaptcha_private_key'] = $input; $this->object = new hn_captcha_X1($CAPTCHA_INIT); } }
function load($options = array()) { // Call the parent class load method (includes necessary files) CaptchaLib::load(); $aFonts = array(cms_join_path($this->getFontPath(), 'FreeSans.ttf'), cms_join_path($this->getFontPath(), 'FreeSerif.ttf')); if (!isset($this->object)) { $this->object = new PhpCaptcha($aFonts, $options['width'], $options['height']); $this->object->DisplayShadow($options['display_shadow'] == '1' ? true : false); $this->object->UseColour($options['use_color'] == '1' ? true : false); if ($options['owner_text'] != '') { $this->object->SetOwnerText($options['owner_text']); } } }
function load() { if (!$this->checkAvailability()) { return; } // Call the parent class load method (includes necessary files) CaptchaLib::load(); if (!isset($this->object)) { $this->object = Text_CAPTCHA::factory('Image'); } }