* namespace = 'contact_form'; * * // in form validator * $img->namespace = 'contact_form'; * if ($img->check($code) == true) { * echo "Valid!"; * } *
* $img->audio_path = '/home/yoursite/public_html/securimage/audio/'; *
* $options = array( * 'text_color' => new Securimage_Color('#013020'), * 'code_length' => 5, * 'num_lines' => 5, * 'noise_level' => 3, * 'font_file' => Securimage::getPath() . '/custom.ttf' * ); * * $img = new Securimage($options); *
* $img = new Securimage(); * $img->code_length = 6; * $img->num_lines = 5; * $img->noise_level = 5; * * $img->show(); // sends the image to browser * exit; *
* $code = $_POST['code']; * $img = new Securimage(); * if ($img->check($code) == true) { * $captcha_valid = true; * } else { * $captcha_valid = false; * } *
* $img = new Securimage(); * $img->outputAudioFile(); // outputs a wav file to the browser * exit; *