Skip to content

Instantly share code, notes, and snippets.

@Octagon-simon
Created October 16, 2021 15:08
Show Gist options
  • Select an option

  • Save Octagon-simon/b4b99adcbddeffe94a611316c09769d3 to your computer and use it in GitHub Desktop.

Select an option

Save Octagon-simon/b4b99adcbddeffe94a611316c09769d3 to your computer and use it in GitHub Desktop.
About the Verify captcha function
<?php
//Call the function
verifyCaptcha($_POST['user_answer']);
//Output 1
$return = [
'captcha_status' => 200,
'captcha_message' => 'Captcha Verified'
];
//Output 2
$return = [
'captcha_status' => 400,
'captcha_message' => 'Captcha Verification failed'
];
//Output 3
$return = [
'captcha_status' => 407,
'captcha_message' => 'Captcha Expired'
];
//Output 4
$return = [
'captcha_status' => 500,
'captcha_message' => 'Session Invalid'
];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment