Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 提交按钮绕过验证码安全_Php_Html - Fatal编程技术网

Php 提交按钮绕过验证码安全

Php 提交按钮绕过验证码安全,php,html,Php,Html,我一直在通过我的联系方式收到垃圾邮件,长话短说,我的验证码不起作用。我使用了sweetcaptcha(),因为它提供了更加用户友好的方法。当用户点击submit时,它会像平常一样发布到我的电子邮件中,但是它不需要用户预先验证码,因此会导致伟哥公司等的垃圾邮件。。。你能不能快速看一下,看看我哪里做错了。我们将一如既往地感谢您的帮助 谢谢 安迪 切换到reCaptcha,或者其他验证码系统,看起来 您的代码似乎是正确的(我可以挑剔==vs==和isset/empty vs array_key_存在并

我一直在通过我的联系方式收到垃圾邮件,长话短说,我的验证码不起作用。我使用了sweetcaptcha(),因为它提供了更加用户友好的方法。当用户点击submit时,它会像平常一样发布到我的电子邮件中,但是它不需要用户预先验证码,因此会导致伟哥公司等的垃圾邮件。。。你能不能快速看一下,看看我哪里做错了。我们将一如既往地感谢您的帮助

谢谢

安迪


切换到reCaptcha,或者其他验证码系统,看起来

您的代码似乎是正确的(我可以挑剔==vs==和isset/empty vs array_key_存在并且_服务器[“请求_方法”]),但我很懒),所以。。。要么check()调用出现错误,要么sweetchaptcha被破坏


作为一个可怕的有趣事实,XRumer/Botmasterlabs多年来反复破解了reCaptcha和PhpBB/Gmail/Yahoo/Hotmail注册验证码(至少直到2010年,我从……起就没有更新过他们的变更日志)

我不知道,但是这个
->
在我看来有点可疑……我再也不会使用它了:谢谢你的回复,我检查了方法,意识到我犯了一个愚蠢的新手错误。我读了一些关于验证码安全性的文章,是的,这些大型网络公司被黑客攻击是多么简单。谢谢你的帮助。。。
   <?php

// require sweetcaptcha php sdk, don't forget to set up your credentials first
require_once('sweetcaptcha.php');

if (empty($_POST)) {
// print sweetcaptcha in your form
?>
    <p class="name">
        <input type="text" name="name" id="name" placeholder="Your Name"       required="required" requiredmessage="Name is required."/>

    </p>

    <p class="email">
        <input type="text" name="email" id="email" placeholder="mail@example.com" required="required"/>

    </p>

    <p class="web">
        <input type="text" name="web" id="web" placeholder="www.example.com   *Not Mandatory*" />

    </p>        

    <p class="text">
        <textarea name="text" placeholder="How can I help?" required="required"></textarea>
    </p>

       <!-- implemet sweetcaptcha -->
       <?php echo $sweetcaptcha->get_html(); ?>
       <!-- continue with your form -->
       <input type="submit" />
       </form>


 <?php
 } else { 

// looks like someone has submitted a form, let's validate it
if (isset($_POST['sckey']) and isset($_POST['scvalue']) and $sweetcaptcha-  >check(array('sckey' => $_POST['sckey'], 'scvalue' => $_POST['scvalue'])) == "true") {
// success! your form was validated
// do what you like next ...
echo "Success! carry on if you will";
}
else {
// alas! the validation has failed, the user might be a spam bot or just got the result  wrong
// handle this as you like
echo "Boohoo! captcha validation failed!";
}

}

?>