Forum Moderators: coopster

Message Too Old, No Replies

Newbie Needs Form Protection

         

pab1953

4:22 pm on Aug 8, 2011 (gmt 0)

10+ Year Member



I have a form on a Go Daddy server that uses GD's gdform.php (see below). Does this provide any sort of spam protection? If not, what can I do to stop spam?

Thanks.


<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET"){
$query_vars = $_GET;
} elseif ($request_method == "POST"){
$query_vars = $_POST;
}
reset($query_vars);
$t = date("U");

$file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
$fp = fopen($file,"w");
while (list ($key, $val) = each ($query_vars)) {
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
fputs($fp,"$val\n");
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
if ($key == "redirect") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != ""){
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}


?>

rocknbil

5:17 pm on Aug 9, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't modify gdform.php on their servers, can you? Write up your own. recently discussed [webmasterworld.com] - follow the link in my post there to help you get started. I've never had to use captcha to stop link spam.