开发者

Stop Bots From Filling Aweber Form

开发者 https://www.devze.com 2023-03-26 21:43 出处:网络
I have a bunch of Aweber forms with just a name and email field on my site. The forms are getting a lot of spam registrations. Is there a way that I can prevent these bots from filling my forms?

I have a bunch of Aweber forms with just a name and email field on my site. The forms are getting a lot of spam registrations. Is there a way that I can prevent these bots from filling my forms?

<form method='post' action='http://www.aweber.com/scripts/addlead.pl'>
  &开发者_JAVA技巧lt;div style='display:none;'>
    <input type='hidden' name='meta_web_form_id' value='-----' />
    <input type='hidden' name='meta_split_id' value='' />
    <input type='hidden' name='listname' value='-----' />
    <input type='hidden' name='redirect' value='-----' />

    <input type='hidden' name='meta_adtracking' value='-----' />
    <input type='hidden' name='meta_message' value='1' />
    <input type='hidden' name='meta_required' value='name,email' />
  </div>

  <ul class='vMenuForm'>
    <li class='lname'>Name(<span class='red'>*</span>):</li>
    <li class='name'><input type='text' name='name' value=''/></li>
    <li class='lemail'>Email(<span class='red'>*</span>):</li>
    <li class='email'><input type='text' name='email' value=''/></li>
    <li class='submit'><input class='button' type='submit' name='submit' value=''/></li>
  </ul>
  <div style='display: none;'><img src='http://forms.aweber.com/form/displays.htm?id=HKwMHMzMTCyM' alt='' /></div>
</form>

This is one of the forms as it exists now. Any ideas?


I would actually put a couple of "honeypot" fields in as type="hidden", such as "last_name", "first_name", as spam bots will usually fill those in. Then, server-side, check to see if those 2 fields are filled in; if so, log the attempt for tracking and stop processing the data. Captchas help some as well, though not as much these days.


Use a captcha system like reCAPTCHA (by Google) or some kind of special "only-humans-can-answer" type thing, like "What day is it today?"

They also have very nice PHP plugins and examples for you. It's very simple, just use it like this:

require_once('recaptchalib.php');
$publickey = "public_key";
echo recaptcha_get_html($publickey);

You could try a few "honeypot" techniques (fields that users can't fill in, usually because are hidden, but fields that bots will normally true to fill in), but bots are learning to counter them these days by detecting if you've set fields the honeypot fields to hidden, both via. CSS and Javscript, so this won't be a guarantee that all bots will be stopped.


I would create the form dynamically using javascript. This should keep the simple Bots from posting your form. Though this solution has drawbacks like your users must have javascript enabled.

0

精彩评论

暂无评论...
验证码 换一张
取 消