使用AdsCaptcha自定义cPanel登录

时间:2011-08-22 18:10:47

标签: captcha cpanel

我正在尝试自定义我的cPanel登录以要求验证码(确切地说是AdsCaptcha。)

我现在设置的方式是用户首先看到验证码(在iframe中),一旦成功回答它,它就会将登录加载到cPanel(可以工作。)

这是执行该操作的代码段:

<?php
    } else {
        if (ValidateCaptcha($captchaId, $privateKey, $challengeValue, $responseValue, $remoteAddress) == "true")
        {
            require("loginframe.php");
            // Corrent answer, continue with your submission process
        } else {
            echo "Wrong";
            // Wrong answer, you may display a new AdsCaptcha and add an error message 
        }
    }       
    ?>

验证并加载登录字段; loginframe.php:

    <p><br>

  <?php
if ($_GET['failed'] == "1") {
?>
  <font color=#FF0000>Your login attempt failed!</font>
  <?php
}
print "<form action='http://removed.com:2082' method=POST>";
?>
  Username: 
  <input type="text" name="user"><br>
  Password: 
  <input type="password" name="pass"><br>
  <?php
print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
?>
  <input type="hidden" name="login_theme" value="default">
  <input type="submit" value="Login">
  </form><br>
</p>

我的问题是,一旦您输入登录详细信息,它就会重新加载到验证码。有什么建议使这项工作?我正在使用cPanel和AdsCaptcha。

0 个答案:

没有答案
相关问题