将php表单发布到.asp函数

时间:2022-01-04 05:37:58

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.

表单被发布到使用PHP到.ASP函数的网站,我的问题是我试图应用hunnypot验证码,但我遇到了PHP函数的问题。

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

这是我开始的PHP

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

and this is the css

这就是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.

我已将此应用于表单,但垃圾邮件仍在通过,所以很明显我错过了一些东西。

1 个解决方案

#1


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/

最常见的解决方案是在表单上使用验证码,如果可以访问代码,则将其验证为asp发送者http://www.captcha.net/ http://sweetcaptcha.com/

#1


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/

最常见的解决方案是在表单上使用验证码,如果可以访问代码,则将其验证为asp发送者http://www.captcha.net/ http://sweetcaptcha.com/