google-captcha
Last commit date
bws_menu
11 years ago
css
11 years ago
images
11 years ago
js
11 years ago
languages
11 years ago
lib
11 years ago
google-captcha.php
11 years ago
google_captcha_check.php
11 years ago
readme.txt
11 years ago
screenshot-1.png
11 years ago
screenshot-2.png
11 years ago
screenshot-3.png
11 years ago
screenshot-4.png
11 years ago
screenshot-5.png
11 years ago
screenshot-6.png
11 years ago
google_captcha_check.php
16 lines
| 1 | <?php |
| 2 | /* Check Google Captcha in shortcode and contact form */ |
| 3 | require_once( 'lib/recaptchalib.php' ); |
| 4 | if ( defined('ABSPATH') ) |
| 5 | require_once( ABSPATH . 'wp-load.php' ); |
| 6 | else |
| 7 | require_once( '../../../wp-load.php' ); |
| 8 | $gglcptch_options = get_option( 'gglcptch_options' ); |
| 9 | $privatekey = $gglcptch_options['private_key']; |
| 10 | $resp = recaptcha_check_answer( $privatekey, |
| 11 | $_SERVER['REMOTE_ADDR'], |
| 12 | $_POST['recaptcha_challenge_field'], |
| 13 | $_POST['recaptcha_response_field'] ); |
| 14 | if ( ! $resp->is_valid ) |
| 15 | echo "error"; |
| 16 | ?> |