나는 웹 양식에서 coldfusion 기능으로 스팸 메일이 전달되지 않도록하기 위해 친구가 이전 html 코드를 수정하도록 돕고 자합니다. 기본적으로 웹 양식은 action = add_to_data.cfm을 호출합니다. 친구는 양식을 통과하는 스팸을 줄이기 위해 recaptcha를 통합하려고합니다. 나는 그 부분을 작업하고 reCaptcha 검증을 완료했습니다. 문제는 coldfusion "add_to_data.cfm"작업을 호출하고 양식의 데이터를 전달하는 방법을 파악할 수 없다는 것입니다. action = mailer.php를 사용하여 exaple을 보여주는 많은 recaptcha 예제가 있지만 양식의 데이터를 coldfusion으로 - "add_to_data.cfm.reCaptcha를 coldfusion .cfm에 대한 form'a 액션으로 통합했습니다.
원형 :
<form method="post" action="add_to_data.CFm">
....blah, blah, blah ... form contents ...
<input type="submit" value="Please add to my Data />
<form>
이제, 구글 개발자 reCAPTCHA를의 turtorial의지도와, 대신 곧바로 "add_to_data.CFm,"유일한 방법가는 내가 reCAPTCHA를 유효성을 검사하는 방법을 알아낼 수 있습니다 "add_to_data.CFm"에서 "action"으로 새로 작성한 "verify_recaptcha.php"로 형식 작업을 변경하여 recaptcha의 유효성을 확인할 수 있습니다.
<form method="post" action="verify_recaptcha.php">
...original form contents ...
<?php
require_once('recaptchalib.php');
$publickey = "your_public_key_goes_here";
echo recaptcha_get_html($publickey);
?>
<input type="submit" />
<form>
이 예는
<?php
require_once('recaptchalib.php');
$privatekey = "your_private_key_goes_here";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Your code here to handle a successful verification
*** this is where I need gather he form outputs and call add_to_data.CFM
*** but HOW??
}
?>
그래서 내 질문은 어떻게 add_to_data.CFm에 '데이터를 보낼 것입니다 verify_recaptcha.php와 recpatcha 확인을위한 구글 개발자 웹 페이지에서 바로입니까 ??
는 나는이 같은 형태의 변수를 얻을 수 위의 '다른'섹션의 내부를 알고
$name = $_POST['yourname'];
$email = $_POST['email'];
$data = $_POST['data'];
$comments = $_POST['comments'];
$formsub = $_POST['Submit'];
그래서 질문은 : 나는 양식을 작성하여 어떻게 행동 "add_to_data에 제출합니다. CFM "?? 사전
은 의미가 있지만 CF를 모르겠습니다. 도대체, 나는 간신히 html을 할 수있다 :) – Steve