Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['recaptcha_response_field']) && isset($_POST['recaptcha_challenge_field'])){
- // process captcha
- $recaptcha_challenge_field = $_POST['recaptcha_challenge_field'];
- $recaptcha_response_field = $_POST['recaptcha_response_field'];
- $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $recaptcha_challenge_field, $recaptcha_response_field);
- if (!$resp->is_valid){
- die ("The reCAPTCHA wasn't entered correctly. Go back and try it again.<!-- reCAPTCHA said: " . $resp->error . ") -->");
- }else{
- $formdata = (isset($_POST['formdata'])) ? explode("&",urldecode($_POST['formdata'])) : array();
- // create associative array for form fields and values
- $formfields = array();
- foreach ($formdata as $key => $val){
- $arr = explode("=",$val);
- $formfields[$arr[0]] = $arr[1];
- unset($arr);
- }
Add Comment
Please, Sign In to add comment