Robblee Tree Service Contact Form

Malicious code content detected.
Your IP Number has been logged.

"; if ($SpamCheck == "Y") { // Check for Website URL's in the form input boxes as if we block website URLs from the form, // then this will stop the spammers wastignt ime sending emails if(isset($_POST['submit'])) { if (preg_match("/http/i", "$name")) {echo "$SpamErrorMessage"; exit();} if (preg_match("/http/i", "$myemail")) {echo "$SpamErrorMessage"; exit();} if (preg_match("/http/i", "$myphone")) {echo "$SpamErrorMessage"; exit();} if (preg_match("/http/i", "$mycomments")) {echo "$SpamErrorMessage"; exit();} } // Patterm match search to strip out the invalid charcaters, this prevents the mail injection spammer $pattern = '/(;|\||`|>|<|&|^|"|'."\n|\r|'".'|{|}|[|]|\)|\()/i'; // build the pattern match string if(isset($_POST['submit'])){ $name = preg_replace($pattern, "", $name); $myemail = preg_replace($pattern, "", $myemail); $myphone = preg_replace($pattern, "", $myphone); $mycomments = preg_replace($pattern, "", $mycomments); } // Check for the injected headers from the spammer attempt // This will replace the injection attempt text with the string you have set in the above config section if(isset($_POST['submit'])) { $find = array("/bcc\:/i","/Content\-Type\:/i","/cc\:/i","/to\:/i"); $name = preg_replace($find, "$SpamReplaceText", $name); $myemail = preg_replace($find, "$SpamReplaceText", $myemail); $myphone = preg_replace($find, "$SpamReplaceText", $myphone); $mycomments = preg_replace($find, "$SpamReplaceText", $mycomments); } // Check to see if the fields contain any content we want to ban if(isset($_POST['submit'])){ if(stristr($name, $SpamReplaceText) !== FALSE) {echo "$SpamErrorMessage"; exit();} if(stristr($mycomments, $SpamReplaceText) !== FALSE) {echo "$SpamErrorMessage"; exit();} } // Do a check on the send email and subject text if(isset($_POST['submit'])) { if(stristr($to, $SpamReplaceText) !== FALSE) {echo "$SpamErrorMessage"; exit();} if(stristr($subject, $SpamReplaceText) !== FALSE) {echo "$SpamErrorMessage"; exit();} } } if(isset($_POST['comments'])) {if (eregi("url=", $mycomments)){ echo "

Sorry, you may not spam this website.

"; echo "
"; die(); } } //////////////////////////////////////////////// if(isset($_POST['submit'])) {if (empty($name) || empty($myemail) || empty($myphone) || empty($mycomments)){ echo "

All fields are required.

"; // If incomplete form is submitted, let visitor know that all fields are required. } elseif (validate_name($name) && validate_email($myemail) && validate_phone($myphone) && !empty($mycomments)){ mail( $to, $subject, $message1, $headers ); echo "

You have sent this message.

"; echo "

Your Name: $name

"; echo "

Your Phone: $myphone

"; echo "

Your Email: $myemail

"; echo "

Your Comments

"; echo "

Thank you for contacting us.

"; // Send email if form is complete and submitted. echo ""; exit; } } if(isset($_POST['submit'])) { include("form2.inc.php"); // include form with warnings if validations not met. } else { include("form.inc.php");// show empty form to first time visitor. } ?>