Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save Octagon-simon/2e4205d4fbc99a144e07eb45ec59d8a8 to your computer and use it in GitHub Desktop.
Full code for captcha to work
<?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">&#8635;</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