Created
October 16, 2021 15:17
-
-
Save Octagon-simon/2e4205d4fbc99a144e07eb45ec59d8a8 to your computer and use it in GitHub Desktop.
Full code for captcha to work
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 | |
| //Captcha verification script | |
| require_once 'core/captcha_verify.php'; | |
| //Captcha custom JS | |
| include_once 'assets/captcha_script.php'; | |
| //Captcha custom CSS | |
| include_once 'assets/captcha_style.php'; | |
| if(isset($_POST)&& isset($_POST['submit'])){ | |
| $myCaptcha = json_decode(verifyCaptcha($_POST['key']), true); | |
| echo $myCaptcha['captcha_message']; | |
| } | |
| ?> | |
| <html> | |
| <head></head> | |
| <body> | |
| <img id="captcha_img" src="core/captcha_image.php"> | |
| <form method="post"> | |
| <div id="captcha_form_group"> | |
| <label id="captcha_form_label">Enter Text</label> | |
| <input id="captcha_key" name="key"> <button id="btn_captcha_refresh" type="button">↻</button> | |
| </div> | |
| <div id="captcha_form_group"> | |
| <button id="btn_captcha_submit" type="submit" name="submit">Verify</button> | |
| </div> | |
| </form> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment