recaptcha v2
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
recaptcha v2
getting a page error and page is not displayed
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/i/r/e/irepear/html/contact.php on line 11
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/i/r/e/irepear/html/contact.php on line 11
Parse error: syntax error, unexpected T_STRING in /home/content/i/r/e/irepear/html/contact.php on line 11
copied and pasted the site and secret keys, set error page, wasnt sure about tabindex so set it to zero "0"
using built in form processor, no other form on page, no added code to page.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/i/r/e/irepear/html/contact.php on line 11
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/i/r/e/irepear/html/contact.php on line 11
Parse error: syntax error, unexpected T_STRING in /home/content/i/r/e/irepear/html/contact.php on line 11
copied and pasted the site and secret keys, set error page, wasnt sure about tabindex so set it to zero "0"
using built in form processor, no other form on page, no added code to page.
Re: recaptcha v2
This error indicates that there is a problem is your settings.
Look for the error in line 11 of the PHP code.
Please note that this extension does not come with support.
Look for the error in line 11 of the PHP code.
Please note that this extension does not come with support.
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
line 11 is code generated by the extension
$recaptcha = new \ReCaptcha\ReCaptcha("secret key goes here");
$recaptcha = new \ReCaptcha\ReCaptcha("secret key goes here");
Re: recaptcha v2
Maybe you have accidentally added an invalid character in your secret key?
This can only be a configuration issue.
This can only be a configuration issue.
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
i copied and pasted the keys directly from my recaptcha account. any other ideas?
Re: recaptcha v2
I need to see the PHP code to be able to help.
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
<?php
require_once './ReCaptcha/ReCaptcha.php';
require_once './ReCaptcha/RequestMethod.php';
require_once './ReCaptcha/RequestParameters.php';
require_once './ReCaptcha/Response.php';
require_once './ReCaptcha/RequestMethod/Post.php';
require_once './ReCaptcha/RequestMethod/Socket.php';
require_once './ReCaptcha/RequestMethod/SocketPost.php';
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha = new \ReCaptcha\ReCaptcha("secret code here");
$response = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if (!$response->isSuccess())
{
die ("The reCAPTCHA code is incorrect. Please try again." . "(Error: " . $response->getErrorCodes() . ")");
}
}
function ValidateEmail($email)
{
$pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
return preg_match($pattern, $email);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'form1')
{
$mailto = 'yourname@address.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Contact Information';
$message = 'Values submitted from web site form:';
$success_url = '';
$error_url = '';
$error = '';
$eol = "\n";
$max_filesize = isset($_POST['filesize']) ? $_POST['filesize'] * 1024 : 1024000;
$boundary = md5(uniqid(time()));
$header = 'From: '.$mailfrom.$eol;
$header .= 'Reply-To: '.$mailfrom.$eol;
$header .= 'MIME-Version: 1.0'.$eol;
$header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
$header .= 'X-Mailer: PHP v'.phpversion().$eol;
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address is invalid!\n<br>";
}
if (!empty($error))
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $error, $errorcode);
echo $errorcode;
exit;
}
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
$logdata = '';
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (!is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
}
}
$body = 'This is a multi-part message in MIME format.'.$eol.$eol;
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol;
$body .= 'Content-Transfer-Encoding: 8bit'.$eol;
$body .= $eol.stripslashes($message).$eol;
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize)
{
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol;
$body .= 'Content-Transfer-Encoding: base64'.$eol;
$body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol;
$body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol;
}
}
}
$body .= '--'.$boundary.'--'.$eol;
if ($mailto != '')
{
mail($mailto, $subject, $body, $header);
}
header('Location: '.$success_url);
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<meta name="keywords" content="iphone repair memphis, memphis iphone repair, cracked screen iphone, ipad repair, ipod repair, jailbreak, unlock">
<meta name="author" content="www.youonthenetyet.com">
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<style type="text/css">
div#container
{
width: 990px;
position: relative;
margin: 0 auto 0 auto;
text-align: left;
}
body
{
background-color: #FFFFFF;
color: #000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
line-height: 1.1875;
margin: 0;
text-align: center;
}
a
{
color: #0000FF;
text-decoration: underline;
}
a:active
{
color: #C0C0C0;
}
a:hover
{
color: #C0C0C0;
text-decoration: underline;
}
#wb_Form1
{
background-color: #FFFFFF;
background-image: none;
border: 1px #CCCCCC solid;
}
#Label1
{
border: 0px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: transparent;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox1
{
border: 1px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox1:focus
{
border-color: #66AFE9;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
outline: 0;
}
#Label2
{
border: 0px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: transparent;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox2
{
border: 1px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox2:focus
{
border-color: #66AFE9;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
outline: 0;
}
#Button1
{
border: 1px #2E6DA4 solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #3370B7;
background-image: none;
color: #FFFFFF;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
}
</style>
<script src="https://www.google.com/recaptcha/api.js?hl=en" async="" defer=""></script>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:192px;top:28px;width:495px;height:340px;z-index:6;">
<form name="contact" method="post" action="<?php echo basename(__FILE__); ?>" enctype="multipart/form-data" id="Form1">
<input type="hidden" name="formid" value="form1">
<label for="Editbox1" id="Label1" style="position:absolute;left:205px;top:14px;width:53px;height:25px;line-height:25px;z-index:0;">Name:</label>
<input type="text" id="Editbox1" style="position:absolute;left:276px;top:14px;width:190px;height:25px;line-height:25px;z-index:1;" name="name" value="">
<label for="Editbox2" id="Label2" style="position:absolute;left:205px;top:54px;width:53px;height:25px;line-height:25px;z-index:2;">Email:</label>
<input type="text" id="Editbox2" style="position:absolute;left:276px;top:54px;width:190px;height:25px;line-height:25px;z-index:3;" name="email" value="">
<input type="submit" id="Button1" name="" value="Send" style="position:absolute;left:187px;top:277px;width:96px;height:25px;z-index:4;">
<div id="wb_Extension1" style="position:absolute;left:113px;top:142px;width:302px;height:76px;z-index:5;">
<div class="g-recaptcha" data-sitekey="6Le5FggUAAAAAFe3IJSBIco0EbKFvpQ7HdX0jxq9"></div>
</div>
</form>
</div>
</div>
</body>
</html>
require_once './ReCaptcha/ReCaptcha.php';
require_once './ReCaptcha/RequestMethod.php';
require_once './ReCaptcha/RequestParameters.php';
require_once './ReCaptcha/Response.php';
require_once './ReCaptcha/RequestMethod/Post.php';
require_once './ReCaptcha/RequestMethod/Socket.php';
require_once './ReCaptcha/RequestMethod/SocketPost.php';
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha = new \ReCaptcha\ReCaptcha("secret code here");
$response = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if (!$response->isSuccess())
{
die ("The reCAPTCHA code is incorrect. Please try again." . "(Error: " . $response->getErrorCodes() . ")");
}
}
function ValidateEmail($email)
{
$pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
return preg_match($pattern, $email);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'form1')
{
$mailto = 'yourname@address.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Contact Information';
$message = 'Values submitted from web site form:';
$success_url = '';
$error_url = '';
$error = '';
$eol = "\n";
$max_filesize = isset($_POST['filesize']) ? $_POST['filesize'] * 1024 : 1024000;
$boundary = md5(uniqid(time()));
$header = 'From: '.$mailfrom.$eol;
$header .= 'Reply-To: '.$mailfrom.$eol;
$header .= 'MIME-Version: 1.0'.$eol;
$header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
$header .= 'X-Mailer: PHP v'.phpversion().$eol;
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address is invalid!\n<br>";
}
if (!empty($error))
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $error, $errorcode);
echo $errorcode;
exit;
}
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
$logdata = '';
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (!is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
}
}
$body = 'This is a multi-part message in MIME format.'.$eol.$eol;
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol;
$body .= 'Content-Transfer-Encoding: 8bit'.$eol;
$body .= $eol.stripslashes($message).$eol;
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize)
{
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol;
$body .= 'Content-Transfer-Encoding: base64'.$eol;
$body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol;
$body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol;
}
}
}
$body .= '--'.$boundary.'--'.$eol;
if ($mailto != '')
{
mail($mailto, $subject, $body, $header);
}
header('Location: '.$success_url);
exit;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<meta name="keywords" content="iphone repair memphis, memphis iphone repair, cracked screen iphone, ipad repair, ipod repair, jailbreak, unlock">
<meta name="author" content="www.youonthenetyet.com">
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<style type="text/css">
div#container
{
width: 990px;
position: relative;
margin: 0 auto 0 auto;
text-align: left;
}
body
{
background-color: #FFFFFF;
color: #000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
line-height: 1.1875;
margin: 0;
text-align: center;
}
a
{
color: #0000FF;
text-decoration: underline;
}
a:active
{
color: #C0C0C0;
}
a:hover
{
color: #C0C0C0;
text-decoration: underline;
}
#wb_Form1
{
background-color: #FFFFFF;
background-image: none;
border: 1px #CCCCCC solid;
}
#Label1
{
border: 0px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: transparent;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox1
{
border: 1px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox1:focus
{
border-color: #66AFE9;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
outline: 0;
}
#Label2
{
border: 0px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: transparent;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox2
{
border: 1px #CCCCCC solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #FFFFFF;
background-image: none;
color :#000000;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
padding: 4px 4px 4px 4px;
text-align: left;
vertical-align: middle;
}
#Editbox2:focus
{
border-color: #66AFE9;
-webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
-moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
box-shadow: inset 0px 1px 1px rgba(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.60);
outline: 0;
}
#Button1
{
border: 1px #2E6DA4 solid;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #3370B7;
background-image: none;
color: #FFFFFF;
font-family: "Times New Roman";
font-weight: normal;
font-size: 21px;
}
</style>
<script src="https://www.google.com/recaptcha/api.js?hl=en" async="" defer=""></script>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:192px;top:28px;width:495px;height:340px;z-index:6;">
<form name="contact" method="post" action="<?php echo basename(__FILE__); ?>" enctype="multipart/form-data" id="Form1">
<input type="hidden" name="formid" value="form1">
<label for="Editbox1" id="Label1" style="position:absolute;left:205px;top:14px;width:53px;height:25px;line-height:25px;z-index:0;">Name:</label>
<input type="text" id="Editbox1" style="position:absolute;left:276px;top:14px;width:190px;height:25px;line-height:25px;z-index:1;" name="name" value="">
<label for="Editbox2" id="Label2" style="position:absolute;left:205px;top:54px;width:53px;height:25px;line-height:25px;z-index:2;">Email:</label>
<input type="text" id="Editbox2" style="position:absolute;left:276px;top:54px;width:190px;height:25px;line-height:25px;z-index:3;" name="email" value="">
<input type="submit" id="Button1" name="" value="Send" style="position:absolute;left:187px;top:277px;width:96px;height:25px;z-index:4;">
<div id="wb_Extension1" style="position:absolute;left:113px;top:142px;width:302px;height:76px;z-index:5;">
<div class="g-recaptcha" data-sitekey="6Le5FggUAAAAAFe3IJSBIco0EbKFvpQ7HdX0jxq9"></div>
</div>
</form>
</div>
</div>
</body>
</html>
Re: recaptcha v2
Can you please leave your 'secret code', because that is where is goes wrong.
All other code is correct.
All other code is correct.
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
<?php
require_once './ReCaptcha/ReCaptcha.php';
require_once './ReCaptcha/RequestMethod.php';
require_once './ReCaptcha/RequestParameters.php';
require_once './ReCaptcha/Response.php';
require_once './ReCaptcha/RequestMethod/Post.php';
require_once './ReCaptcha/RequestMethod/Socket.php';
require_once './ReCaptcha/RequestMethod/SocketPost.php';
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha = new \ReCaptcha\ReCaptcha("6Le5FggUAAAAANachBD9R4lAvyBAxMW0TdHgB_kH");
$response = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if (!$response->isSuccess())
{
die ("The reCAPTCHA code is incorrect. Please try again." . "(Error: " . $response->getErrorCodes() . ")");
}
}
function ValidateEmail($email)
{
$pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
return preg_match($pattern, $email);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'form1')
require_once './ReCaptcha/ReCaptcha.php';
require_once './ReCaptcha/RequestMethod.php';
require_once './ReCaptcha/RequestParameters.php';
require_once './ReCaptcha/Response.php';
require_once './ReCaptcha/RequestMethod/Post.php';
require_once './ReCaptcha/RequestMethod/Socket.php';
require_once './ReCaptcha/RequestMethod/SocketPost.php';
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha = new \ReCaptcha\ReCaptcha("6Le5FggUAAAAANachBD9R4lAvyBAxMW0TdHgB_kH");
$response = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if (!$response->isSuccess())
{
die ("The reCAPTCHA code is incorrect. Please try again." . "(Error: " . $response->getErrorCodes() . ")");
}
}
function ValidateEmail($email)
{
$pattern = '/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i';
return preg_match($pattern, $email);
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'form1')
Re: recaptcha v2
I do not see any errors in the code.
Did you publish all files (and in the right folder)?
Did you publish all files (and in the right folder)?
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
I did publish all files. No separate folder just the main folder that the rest of the site is published. Are ther any other files that need to be published to the server?
Re: recaptcha v2
All the files generated by the extension need to be published/uploaded:
Code: Select all
require_once './ReCaptcha/ReCaptcha.php';
require_once './ReCaptcha/RequestMethod.php';
require_once './ReCaptcha/RequestParameters.php';
require_once './ReCaptcha/Response.php';
require_once './ReCaptcha/RequestMethod/Post.php';
require_once './ReCaptcha/RequestMethod/Socket.php';
require_once './ReCaptcha/RequestMethod/SocketPost.php';
- iamafireman
-
- Posts: 91
- Joined: Mon May 26, 2008 2:41 am
- Location: Tennessee
Re: recaptcha v2
those files are on server and in that structure
Re: recaptcha v2
In that case I do not know why it does work for you.
There is no error in the code as far as I can tell.
There is no error in the code as far as I can tell.
-
-
- Posts: 1
- Joined: Mon Oct 31, 2016 7:50 am
Re: recaptcha v2
Hi. I had the same problem
My Fix. I changed the PHP version in my domain settings.
php version 5.2.17 did not work so i changed it to 5.3.29
Which then worked for me.
My Fix. I changed the PHP version in my domain settings.
php version 5.2.17 did not work so i changed it to 5.3.29
Which then worked for me.