Created
October 16, 2021 15:08
-
-
Save Octagon-simon/b4b99adcbddeffe94a611316c09769d3 to your computer and use it in GitHub Desktop.
About the Verify captcha function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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