<?php ini_set('default_charset', 'utf-8'); header('Content-type: text/html; charset=UTF-8'); session_start(); $status = ''; if ( isset($_POST['captcha']) && ($_POST['captcha']!="") ){ // Validation: Checking entered captcha code with the generated captcha code if(strcasecmp($_SESSION['captcha'], $_POST['captcha']) != 0){ // Note: the captcha code is compared case insensitively. // if you want case sensitive match, update the check above to strcmp() $status = "<p style='color:#FFFFFF; font-size:20px'><span style='background-color:#FF0000;'>Entered captcha code does not match! Kindly try again.</span></p>"; }else{ $status = "<p style='color:#FFFFFF; font-size:20px'><span style='background-color:#46ab4a;'>Your captcha code is match.</span></p>"; } }
0
<?php ini_set('default_charset', 'utf-8'); header('Content-type: text/html; charset=UTF-8'); session_start(); //You can customize your captcha settings here $captcha_code = ''; $captcha_image_height = 50; $captcha_image_width = 130; $total_characters_on_image = 5; //The characters that can be used in the CAPTCHA code. //avoid all confusing characters and numbers (For example: l, 1 and i) $possible_captcha_letters = ' ب ت ث ج ح خ د ذ ر ز س ش ص ض ع غ ف ق ك ل م ن و ه ي'; $captcha_font = 'Calibri.ttf'; $random_captcha_dots