-2

I am looking at a website for a friend, to resolve his spam issue with one of his forms.

the form is posted to a website using PHP to an .ASP function, the issue i have is i an trying to apply hunnypot captcha, but am having trouble with PHP function.

i was wondering if some one could point me in the right direction please.

here is the form

// Usage: [form]form action URL here[/form]
function form_func( $atts, $content = null ) {
    extract(shortcode_atts(array(
        'action' => '',
    ), $atts));
    return '<div class="text-center"><strong>Apply Now with this easy form</strong></div>
<form id="contact-form" action="'.do_shortcode($content).'" method="post" novalidate="novalidate">
  <ul>
    <li><input type="text" name="name" placeholder="Name:" id="name" value="" /></li>
    <li><input type="tel" name="phone" placeholder="Telephone Number:" id="phone" value="" /></li>
    <li><input type="text" name="post-code" placeholder="Post Code:" id="post-code" value="" /></li>
    <li><input type="email" name="email" id="email" placeholder="Email:" value="" /></li>
    <li class="email2"><input type="email" name="repeatemail" id="repeatemail" placeholder="Email:" value="" /></li>
  </ul>
  <input type="submit" value="Send" />

</form>';
}

this is where it is being sent to

http://www.bigresponder.com/remote_contact.asp?si=563&p=494225795

and here is the PHP i have started

if($_POST['repeatemail'] != ''){
    echo "It appears you are a bot!";
}
else{
//process the rest of the form
}

and this is the css

li.email2{display:none;}

i have applied this to the form, but the spam is still getting through, so obviously i am missing something.

user2513528
  • 161
  • 2
  • 11

1 Answers1

0

Good Day, you must check this out first, Blocking comment spam without using captcha

the most commons solution is using captcha on the form and validate it into asp sender if you can access code http://www.captcha.net/ http://sweetcaptcha.com/

Community
  • 1
  • 1
carlos a.
  • 148
  • 9
  • Hi, thank you for you reply, I have looked at the different forms of captcha a number of times, but the owner of the website doesn't want something visible, hence forth why I was looking at hunnypot captcha, it is a WordPress site, and was a little unsure as to what function posted the form, I think I have found it, but what I am unsure how else to post it to the http address, can I apply that address in the post function? – user2513528 May 05 '15 at 20:28
  • you´re welcome, if is a wordpress i suggest you see this, http://codex.wordpress.org/Hardening_WordPress and try to replace contact form with a plugin -> https://wordpress.org/plugins/search.php?q=contact – carlos a. May 05 '15 at 23:01
  • Hi, OK thank you I'll take a look, would using a plugin form still give me the function to post to the URL address? – user2513528 May 06 '15 at 00:33