image_width = 175; $img->image_height = 60; $img->num_lines = 3; $img->perturbation = 0.2; $img->iscale = 1; if(isset($_GET['si_sm_captcha']) && $_GET['si_sm_captcha'] == 1) { $img->image_width = 132; $img->image_height = 45; $img->num_lines = 1; } //set some settings $img->nosession = true; $img->prefix = $prefix; $img->captcha_path = $img->working_directory . '/cache/'; if(file_exists($img->captcha_path . $prefix . '.php') && is_readable( $img->captcha_path . $prefix . '.php' ) ) { include( $img->captcha_path . $prefix . '.php' ); $img->captcha_word = $captcha_word; } else { $img->captcha_word = $captcha_word; } $img->line_color = new Securimage_Color_si(rand(0, 64), rand(64, 128), rand(128, 255)); $img->show(''); if(!file_exists($img->captcha_path . $prefix . '.php')) { $img->clean_temp_dir( $img->captcha_path ); if ( $fh = fopen( $img->captcha_path . $prefix . '.php', 'w' ) ) { fwrite( $fh, '' ); fclose( $fh ); @chmod( $img->captcha_path . $prefix . '.php', 0755 ); } } unset($img); exit; } else { // session include 'securimage.php'; $img = new Securimage_Captcha_si(); $img->image_width = 175; $img->image_height = 60; $img->num_lines = 3; $img->perturbation = 0.2; $img->iscale = 1; //$img->code_length = 4; //$img->charset = 'ABCDEFGHKLMNPRSTUVWYZabcdeghmnpsuvwyz23456789'; if(isset($_GET['si_sm_captcha']) && $_GET['si_sm_captcha'] == 1) { $img->image_width = 132; $img->image_height = 45; $img->num_lines = 1; } //set some settings if( isset($_GET['si_form_id']) && in_array($_GET['si_form_id'], array('com', 'reg', 'log')) ) { $img->form_id = $_GET['si_form_id']; } $img->line_color = new Securimage_Color_si(rand(0, 64), rand(64, 128), rand(128, 255)); $img->show(''); unset($img); exit; } // end of file