
joe guy - 2011-08-30 11:35:58
Hi,
Suggestion #1
not needed to create a class with
$img = new Fox_captcha(1,1,1);
this is better:
if(Fox_captcha::test($_POST['code'])){ ...
Suggestion #2
not needed for user to set $img->class_dir
find the path automatically:
$this->class_dir = str_replace('Fox_captcha.php', '', __FILE__);
$this->class_dir = str_replace('\\', '/', $this->class_dir);
$this->class_dir = str_replace($_SERVER['DOCUMENT_ROOT'], '', $this->class_dir);
$this->class_dir = '/' . ltrim($this->class_dir, '/');