我有一個聯繫人的PHP聯繫人文件, 我在我的HTML主題下添加了reCAPTCHA,在聯繫表格 下,但我希望代碼確保客戶或想要的人聯繫通過reCAPTCHA ..!如何確保通過reCAPTCHA驗證的人
這裏是我的PHP代碼聯繫:
<?
$name = $_POST[name];
$email = $_POST[email];
$type = $_POST[type];
$message = $_POST[message];
if ($name == "") {
die('name null');
}
if ($type == "" || $email == "" || $message == "") {
die("not null");
}
$myemail = "[email protected]";
$s = "$name";
$body = "<b>Message from Client</b> <br><br> Name: <b>$name</b><br> Package: <b>$type</b><br> E-mail: <b>$email</b><br> Message: <b>$message</b>";
$headers = 'From: '.$email."\r\n".'Content-Type: text/html; charset=utf-8'."\r\n";
mail($myemail, $s, $body, $headers);
header('Content-Type: application/json');
echo json_encode(array('response' => 'success'));
?>
可以讓這個對我即時通訊不親PHP程序員..! –
在此貼上表格的標記。所以我可以看看。 –
我使用谷歌recaptcha https://www.google.com/recaptcha/intro/index.html –