Forum Clubic

Recaptcha marche pas... php

Salut à tous

Voilà, j’ai un site Nuked klan SP4.2 et j’ai un livre d’or qui est littéralement bombardé par les spams.

J’ai donc décidé de mettre reCAPTCHA

J’arrive à l’installer et tout et tout mais le truc, c’est que n’importe quoi que je rentre dans le champ de recaptcha, il fait comme si j’avai donné le bon code, en 5 mots, il passe tout le temps.

Voilà si qqun peut jeter un oeil à mon script php ça serait sympa… J’ai effacé mes cles privé et publiques mais sur mon serveur, elles y sont.

<?php
// -------------------------------------------------------------------------//
// Nuked-KlaN - PHP Portal                                                  //
// [www.nuked-klan.org...](http://www.nuked-klan.org)                                                //
// -------------------------------------------------------------------------//
// This program is free software. you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License.           //
// -------------------------------------------------------------------------//
if (!defined("INDEX_CHECK"))
{
    die ("<div style=\"text-align: center;\">You cannot open this page directly</div>");
}

global $nuked, $language, $user;
translate("modules/Guestbook/lang/" . $language . ".lang.php");

if (!$user)
{
    $visiteur = 0;
}
else
{
    $visiteur = $user[1];
}
$ModName = basename(dirname(__FILE__));
$level_access = nivo_mod($ModName);
if ($visiteur >= $level_access && $level_access > -1)
{
    compteur("Guestbook");

    function post_book()
    {
        global $user, $nuked;

        opentable();

        echo "<script type=\"text/javascript\">\n"
   ."<!--\n"
   . "\n"
    ."function trim(string)\n"
    ."{"
    ."return string.replace(/(^\s*)|(\s*$)/g,'');"
    ."}\n"
   ."\n"
   . "function verifchamps()\n"
   . "{\n"
   . "\n"
   . "if (trim(document.getElementById('guest_name').value) == \"\")\n"
   . "{\n"
   . "alert('" . _NONICK . "');\n"
   . "return false;\n"
   . "}\n"
   . "\n"
   . "if (document.getElementById('guest_mail').value.indexOf('@') == -1)\n"
   . "{\n"
   . "alert('" . _ERRORMAIL . "');\n"
      . "return false;\n"
   . "}\n"
   . "\n"
   . "if (trim(document.getElementById('guestbooktext').value) == \"\")\n"
   . "{\n"
   . "alert('" . _NOTEXT . "');\n"
      . "return false;\n"
   . "}\n"
   . "\n"
   . "return true;\n"
   . "}\n"
       . "\n"
   . "// -->\n"
   . "</script>\n";

        if ($user)
        {
            $sql = mysql_query("SELECT url, email FROM " . USER_TABLE . " WHERE pseudo = '" . $user[2] . "'");
            list($url, $mail) = mysql_fetch_array($sql);
        }
      
      
      
      
        echo "<br /><div style=\"text-align: center;\"><big><b>" . _GUESTBOOK . "</b></big></div><br />\n"
   . "<form method=\"post\" action=\"index.php?file=Guestbook&op=send_book\" onsubmit=\"backslash('guestbooktext');BBcode_close('guestbooktext'); return verifchamps();\">\n"
   . "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" cellspacing=\"0\" cellpadding=\"2\"border=\"0\">\n"
   . "<tr><td><b>" . _AUTHOR . " :</b></td><td><input id=\"guest_name\" type=\"text\" name=\"name\" value=\"" . $user[2] . "\" size=\"20\" maxlength=\"30\" /></td></tr>\n"
   . "<tr><td><b>" . _MAIL . " :</b></td><td><input id=\"guest_mail\" type=\"text\" name=\"email\" value=\"" . $mail . "\" size=\"40\" maxlength=\"80\" /></td></tr>\n"
   . "<tr><td><b>" . _URL . " :</b></td><td><input type=\"text\" name=\"url\" value=\"" . $url . "\" size=\"40\" maxlength=\"80\" /></td></tr>\n"
   . "<tr><td align=\"center\" colspan=\"2\">\n";

        buttonBB("guestbooktext");

        echo "</td></tr><tr><td align=\"center\" colspan=\"2\">\n";

        smiley("guestbooktext");
require_once('recaptchalib.php');
$publickey = "ma clé";
$privatekey = "ma clé aussi";

# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;

# are we submitting the page?
if ($_POST["submit"]) {
  $resp = recaptcha_check_answer ($privatekey,
                                  $_SERVER["REMOTE_ADDR"],
                                  $_POST["recaptcha_challenge_field"],
                                  $_POST["recaptcha_response_field"]);

  if ($resp->is_valid) {
    echo "You got it!";
    # in a real application, you should send an email, create an account, etc
  } else {
    # set the error code so that we can display it. You could also use
    # die ("reCAPTCHA failed"), but using the error message is
    # more user friendly
    $error = $resp->error;
  }
}
echo recaptcha_get_html($publickey, $error);

        echo "</td></tr><tr><td colspan=\"2\"><b>" . _COMMENT . " :</b></td></tr>\n"
   . "<tr><td colspan=\"2\"><textarea id=\"guestbooktext\" name=\"comment\" cols=\"65\" rows=\"12\" onselect=\"storeCaret('guestbooktext');\" onclick=\"storeCaret('guestbooktext');\" onkeyup=\"storeCaret('guestbooktext');\"></textarea></td></tr>\n"
   . "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"" . _SEND . "\" /> <input type=\"button\" value=\"" . _CANCEL . "\" onclick=\"javascript:history.back()\" /></td></tr></table></form><br />\n";



        closetable();
    }

    function send_book($name, $email, $url, $comment)
    {
        global $user, $nuked, $user_ip;

        opentable();

        if ($user[2] != "")
        {
            $pseudo = $user[2];
        }
        else
        {
            $name = verif_pseudo($name);
            $name = htmlentities($name, ENT_QUOTES);

            if ($name == "error1")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _PSEUDOFAILDED . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else if ($name == "error2")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _RESERVNICK . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else if ($name == "error3")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _BANNEDNICK . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else
            {
                $pseudo = $name;
            }
        }

        $email = htmlentities($email);
        $sql3 = mysql_query("SELECT email FROM " . BANNED_TABLE . " WHERE email = '" . $email . "'");
        $nb_ban = mysql_num_rows($sql3);

        if ($nb_ban > 0)
        {
            echo "<br /><br /><div style=\"text-align: center;\">" . _BANNEDEMAIL . "</div><br /><br />";
            redirect("index.php?file=Guestbook&op=post_book", 2);
            closetable();
            footer();
            exit();
        }

        $sql2 = mysql_query("SELECT date, host FROM " . GUESTBOOK_TABLE . " ORDER BY id DESC LIMIT 0, 1");
        list($flood_date, $flood_ip) = mysql_fetch_array($sql2);

        $anti_flood = $flood_date + 60;

        $date = time();

        if ($user_ip == $flood_ip && $date < $anti_flood)
        {
            echo "<br /><br /><div style=\"text-align: center;\">" . _NOFLOOD . "</div><br /><br />";
            redirect("index.php?file=Guestbook", 2);
            closetable();
            footer();
            exit();
        }

        else if ($comment != "")
        {
            $date = time();
            $comment = addslashes($comment);
            $pseudo = addslashes($pseudo);
            $email = addslashes($email);

            if ($url != "" && !eregi("http://", $url))
            {
                $url = "http://" . addslashes($url);
            }

            $sql = mysql_query("INSERT INTO " . GUESTBOOK_TABLE . " ( `id` , `name` , `email` , `url` , `date` , `host` , `comment` ) VALUES ( '' , '" . $pseudo . "' , '" . $email . "' , '" . $url . "' , '" . $date . "' , '" . $user_ip . "' , '" . $comment . "' )");
            echo "<br /><br /><div style=\"text-align: center;\">" . _POSTADD . "</div><br /><br />";
            redirect("index.php?file=Guestbook", 2);
            closetable();
        }
    }

    function index()
    {
        global $p, $nuked, $language, $bgcolor1, $bgcolor2, $bgcolor3, $user, $visiteur;

        opentable();

        $nb_mess_guest = $nuked['mess_guest_page'];

        $sql = mysql_query("SELECT id FROM " . GUESTBOOK_TABLE);
        $count = mysql_num_rows($sql);

        if (!$p) $p = 1;
        $start = $p * $nb_mess_guest - $nb_mess_guest;

        echo "<br /><div style=\"text-align: center;\"><big><b>" . _GUESTBOOK . "</b></big>\n"
   . "<br /><br />[ <a href=\"index.php?file=Guestbook&op=post_book\">" . _SIGNGUESTBOOK . "</a> ]</div><br />\n";

        if ($count > $nb_mess_guest)
        {
            number($count, $nb_mess_guest, "index.php?file=Guestbook");
        }

        echo "<table style=\"background: " . $bgcolor3 . ";\" width=\"100%\" cellpadding=\"3\" cellspacing=\"1\">\n"
   . "<tr style=\"background: " . $bgcolor3 . ";\">\n"
   . "<td style=\"width: 30%;\" align=\"center\"><b>" . _AUTHOR . "</b></td>\n"
   . "<td style=\"width: 70%;\" align=\"center\"><b>" . _COMMENT . "</b></td></tr>\n";

        $sql2 = mysql_query("SELECT id, name, comment, email, url, date, host FROM " . GUESTBOOK_TABLE . " ORDER BY id DESC LIMIT " . $start . ", " . $nb_mess_guest);
        while (list($id, $name, $comment, $email, $url, $date, $ip) = mysql_fetch_array($sql2))
        {
            $date = strftime("%x %H:%M", $date);
            $name = stripslashes($name);
            $comment = stripslashes($comment);

            $comment = htmlentities($comment);
            $url = htmlentities($url);

            $url = nk_CSS($url);
            $email = nk_CSS($email);
            $comment = nk_CSS($comment);

            $comment = BBcode($comment);
            $comment = icon($comment);

            if (strlen($name) > 30)
            {
                $name = substr($name, 0, 30) . "...";
            }

            $name = nk_CSS($name);

            if ($j == 0)
            {
                $bg = $bgcolor2;
                $j++;
            }
            else
            {
                $bg = $bgcolor1;
                $j = 0;
            }

            if ($url != "")
            {
                $website = " <a href=\"" . $url . "\" onclick=\"window.open(this.href); return false;\"><img style=\"border: 0;\" src=\"modules/Forum/images/website.gif\" alt=\"\" title=\"" . $url . "\" /></a>";
            }
            else
            {
                $website = "";
            }
            if ($email != "")
            {
                $usermail = "<a href=\"mailto:" . $email . "\"><img style=\"border: 0;\" src=\"modules/Forum/images/email.gif\" alt=\"\" title=\"" . $email . "\" /></a>";
            }
            else
            {
                $usermail = "";
            }

            if ($visiteur >= admin_mod("Guestbook"))
            {
                echo "<script type=\"text/javascript\">\n"
                . "<!--\n"
                . "\n"
                . "function delmess(pseudo, id)\n"
                . "{\n"
                . "if (confirm('" . _SIGNDELETE . " '+pseudo+' ! " . _CONFIRM . "'))\n"
                . "{document.location.href = 'index.php?file=Guestbook&page=admin&op=del_book&gid='+id;}\n"
                . "}\n"
                . "\n"
                . "// -->\n"
                . "</script>\n";

                $admin = " <a href=\"index.php?file=Guestbook&page=admin&op=edit_book&gid=" . $id . "\"><img style=\"border: 0;\" src=\"modules/Forum/images/buttons/" . $language . "/edit.gif\" alt=\"\" /></a>"
                . " <a href=\"javascript:delmess('" . addslashes($name) . "', '" . $id . "');\"><img style=\"border: 0;\" src=\"modules/Forum/images/delete.gif\" alt=\"\" /></a>";
            }
            else
            {
                $admin = "";
            }

            echo "<tr style=\"background: " . $bg . ";\"><td style=\"width: 30%;\" valign=\"top\"><b>" . $name . "</b>";

            if ($visiteur >= admin_mod("Guestbook"))
            {
                echo "<br />Ip : " . $ip;
            }

            echo "</td><td style=\"width: 70%;\"><img src=\"images/posticon.gif\" alt=\"\" /><small> " . _POSTED . " : " . $date . "</small>\n"
            . "<br /><br />" . $comment . "<br /><br /></td></tr>\n"
            . "<tr style=\"background: " . $bg . ";\"><td style=\"width: 30%;\"> </td><td style=\"width: 70%;\">" . $usermail . $website . $admin . "</td></tr>\n";
        }

        if ($count == 0)
        {
            echo "<tr style=\"background: " . $bgcolor2 . ";\"><td align=\"center\" colspan=\"2\">" . _NOSIGN . "</td></tr>\n";
        }

        echo "</table>\n";

        if ($count > $nb_mess_guest)
        {
            number($count, $nb_mess_guest, "index.php?file=Guestbook");
        }

        echo "<br /><div style=\"text-align: center;\"><small><i>( " . _THEREIS . " " . $count . " " . _SIGNINDB . " )</i></small></div><br />\n";

        closetable();
    }

    switch ($op)
    {
        case "post_book":
            post_book();
            break;

        case "send_book":
            send_book($name, $email, $url, $comment);
            break;

        default:
            index();
            break;
    }
}
else if ($level_access == -1)
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>";
    closetable();
}
else if ($level_access == 1 && $visiteur == 0)
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _USERENTRANCE . "<br /><br /><b><a href=\"index.php?file=User&op=login_screen\">" . _LOGINUSER . "</a> | <a href=\"index.php?file=User&op=reg_screen\">" . _REGISTERUSER . "</a></b><br /><br /></div>";
    closetable();
}
else
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>";
    closetable();
} 

?>

Ah oui, j’ai oublié, je suis débutant en php, meme tres débutant…

Merci d’avance pour votre aide

C bon j’ai trouvé la solution, merci quand même, même si vous n’avez pas eut le temps de regarder le post lol

pour info, ça pourra peut etre servir à qqun je vous donne mon script…

<?php
// -------------------------------------------------------------------------//
// Nuked-KlaN - PHP Portal                                                  //
// [www.nuked-klan.org...](http://www.nuked-klan.org)                                                //
// -------------------------------------------------------------------------//
// This program is free software. you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License.           //
// -------------------------------------------------------------------------//
if (!defined("INDEX_CHECK"))
{
    die ("<div style=\"text-align: center;\">You cannot open this page directly</div>");
}

global $nuked, $language, $user;
translate("modules/Guestbook/lang/" . $language . ".lang.php");

if (!$user)
{
    $visiteur = 0;
}
else
{
    $visiteur = $user[1];
}
$ModName = basename(dirname(__FILE__));
$level_access = nivo_mod($ModName);
if ($visiteur >= $level_access && $level_access > -1)
{
    compteur("Guestbook");

    function post_book()
    {
        global $user, $nuked;

        opentable();

        echo "<script type=\"text/javascript\">\n"
   ."<!--\n"
   . "\n"
    ."function trim(string)\n"
    ."{"
    ."return string.replace(/(^\s*)|(\s*$)/g,'');"
    ."}\n"
   ."\n"
   . "function verifchamps()\n"
   . "{\n"
   . "\n"
   . "if (trim(document.getElementById('guest_name').value) == \"\")\n"
   . "{\n"
   . "alert('" . _NONICK . "');\n"
   . "return false;\n"
   . "}\n"
   . "\n"
   . "if (document.getElementById('guest_mail').value.indexOf('@') == -1)\n"
   . "{\n"
   . "alert('" . _ERRORMAIL . "');\n"
      . "return false;\n"
   . "}\n"
   . "\n"
   . "if (trim(document.getElementById('guestbooktext').value) == \"\")\n"
   . "{\n"
   . "alert('" . _NOTEXT . "');\n"
      . "return false;\n"
   . "}\n"
   . "\n"
   . "return true;\n"
   . "}\n"
       . "\n"
   . "// -->\n"
   . "</script>\n";

        if ($user)
        {
            $sql = mysql_query("SELECT url, email FROM " . USER_TABLE . " WHERE pseudo = '" . $user[2] . "'");
            list($url, $mail) = mysql_fetch_array($sql);
        }
      
      
      
      
        echo "<br /><div style=\"text-align: center;\"><big><b>" . _GUESTBOOK . "</b></big></div><br />\n"
   . "<form method=\"post\" action=\"index.php?file=Guestbook&op=send_book\" onsubmit=\"backslash('guestbooktext');BBcode_close('guestbooktext'); return verifchamps();\">\n"
   . "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" cellspacing=\"0\" cellpadding=\"2\"border=\"0\">\n"
   . "<tr><td><b>" . _AUTHOR . " :</b></td><td><input id=\"guest_name\" type=\"text\" name=\"name\" value=\"" . $user[2] . "\" size=\"20\" maxlength=\"30\" /></td></tr>\n"
   . "<tr><td><b>" . _MAIL . " :</b></td><td><input id=\"guest_mail\" type=\"text\" name=\"email\" value=\"" . $mail . "\" size=\"40\" maxlength=\"80\" /></td></tr>\n"
   . "<tr><td><b>" . _URL . " :</b></td><td><input type=\"text\" name=\"url\" value=\"" . $url . "\" size=\"40\" maxlength=\"80\" /></td></tr>\n"
   . "<tr><td align=\"center\" colspan=\"2\">\n";

require_once('recaptchalib.php');
$publickey = "votre public key";
echo recaptcha_get_html($publickey);

        buttonBB("guestbooktext");

        echo "</td></tr><tr><td align=\"center\" colspan=\"2\">\n";

        smiley("guestbooktext");




        echo "</td></tr><tr><td colspan=\"2\"><b>" . _COMMENT . " :</b></td></tr>\n"
   . "<tr><td colspan=\"2\"><textarea id=\"guestbooktext\" name=\"comment\" cols=\"65\" rows=\"12\" onselect=\"storeCaret('guestbooktext');\" onclick=\"storeCaret('guestbooktext');\" onkeyup=\"storeCaret('guestbooktext');\"></textarea></td></tr>\n"
   . "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"" . _SEND . "\" /> <input type=\"button\" value=\"" . _CANCEL . "\" onclick=\"javascript:history.back()\" /></td></tr></table></form><br />\n";



        closetable();
    }

    function send_book($name, $email, $url, $comment)
    {
        global $user, $nuked, $user_ip;

        opentable();

        require_once('recaptchalib.php');
$privatekey = "votre privatekey";
$resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
  die ("Le code de confirmation visuelle est éronné, veuillez réessayer" .
       "(reCAPTCHA said: " . $resp->error . ")");
}

      
      if ($user[2] != "")
        {
            $pseudo = $user[2];
        }
        else
        {
            $name = verif_pseudo($name);
            $name = htmlentities($name, ENT_QUOTES);

            if ($name == "error1")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _PSEUDOFAILDED . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else if ($name == "error2")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _RESERVNICK . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else if ($name == "error3")
            {
                echo "<br /><br /><div style=\"text-align: center;\">" . _BANNEDNICK . "</div><br /><br />";
                redirect("index.php?file=Guestbook&op=post_book", 2);
                closetable();
                footer();
                exit();
            }
            else
            {
                $pseudo = $name;
            }
        }

        $email = htmlentities($email);
        $sql3 = mysql_query("SELECT email FROM " . BANNED_TABLE . " WHERE email = '" . $email . "'");
        $nb_ban = mysql_num_rows($sql3);

        if ($nb_ban > 0)
        {
            echo "<br /><br /><div style=\"text-align: center;\">" . _BANNEDEMAIL . "</div><br /><br />";
            redirect("index.php?file=Guestbook&op=post_book", 2);
            closetable();
            footer();
            exit();
        }

        $sql2 = mysql_query("SELECT date, host FROM " . GUESTBOOK_TABLE . " ORDER BY id DESC LIMIT 0, 1");
        list($flood_date, $flood_ip) = mysql_fetch_array($sql2);

        $anti_flood = $flood_date + 60;

        $date = time();

        if ($user_ip == $flood_ip && $date < $anti_flood)
        {
            echo "<br /><br /><div style=\"text-align: center;\">" . _NOFLOOD . "</div><br /><br />";
            redirect("index.php?file=Guestbook", 2);
            closetable();
            footer();
            exit();
        }

        else if ($comment != "")
        {
            $date = time();
            $comment = addslashes($comment);
            $pseudo = addslashes($pseudo);
            $email = addslashes($email);

            if ($url != "" && !eregi("http://", $url))
            {
                $url = "http://" . addslashes($url);
            }

            $sql = mysql_query("INSERT INTO " . GUESTBOOK_TABLE . " ( `id` , `name` , `email` , `url` , `date` , `host` , `comment` ) VALUES ( '' , '" . $pseudo . "' , '" . $email . "' , '" . $url . "' , '" . $date . "' , '" . $user_ip . "' , '" . $comment . "' )");
            echo "<br /><br /><div style=\"text-align: center;\">" . _POSTADD . "</div><br /><br />";
            redirect("index.php?file=Guestbook", 2);
            closetable();
        }
    }

    function index()
    {
        global $p, $nuked, $language, $bgcolor1, $bgcolor2, $bgcolor3, $user, $visiteur;

        opentable();

        $nb_mess_guest = $nuked['mess_guest_page'];

        $sql = mysql_query("SELECT id FROM " . GUESTBOOK_TABLE);
        $count = mysql_num_rows($sql);

        if (!$p) $p = 1;
        $start = $p * $nb_mess_guest - $nb_mess_guest;

        echo "<br /><div style=\"text-align: center;\"><big><b>" . _GUESTBOOK . "</b></big>\n"
   . "<br /><br />[ <a href=\"index.php?file=Guestbook&op=post_book\">" . _SIGNGUESTBOOK . "</a> ]</div><br />\n";

        if ($count > $nb_mess_guest)
        {
            number($count, $nb_mess_guest, "index.php?file=Guestbook");
        }

        echo "<table style=\"background: " . $bgcolor3 . ";\" width=\"100%\" cellpadding=\"3\" cellspacing=\"1\">\n"
   . "<tr style=\"background: " . $bgcolor3 . ";\">\n"
   . "<td style=\"width: 30%;\" align=\"center\"><b>" . _AUTHOR . "</b></td>\n"
   . "<td style=\"width: 70%;\" align=\"center\"><b>" . _COMMENT . "</b></td></tr>\n";

        $sql2 = mysql_query("SELECT id, name, comment, email, url, date, host FROM " . GUESTBOOK_TABLE . " ORDER BY id DESC LIMIT " . $start . ", " . $nb_mess_guest);
        while (list($id, $name, $comment, $email, $url, $date, $ip) = mysql_fetch_array($sql2))
        {
            $date = strftime("%x %H:%M", $date);
            $name = stripslashes($name);
            $comment = stripslashes($comment);

            $comment = htmlentities($comment);
            $url = htmlentities($url);

            $url = nk_CSS($url);
            $email = nk_CSS($email);
            $comment = nk_CSS($comment);

            $comment = BBcode($comment);
            $comment = icon($comment);

            if (strlen($name) > 30)
            {
                $name = substr($name, 0, 30) . "...";
            }

            $name = nk_CSS($name);

            if ($j == 0)
            {
                $bg = $bgcolor2;
                $j++;
            }
            else
            {
                $bg = $bgcolor1;
                $j = 0;
            }

            if ($url != "")
            {
                $website = " <a href=\"" . $url . "\" onclick=\"window.open(this.href); return false;\"><img style=\"border: 0;\" src=\"modules/Forum/images/website.gif\" alt=\"\" title=\"" . $url . "\" /></a>";
            }
            else
            {
                $website = "";
            }
            if ($email != "")
            {
                $usermail = "<a href=\"mailto:" . $email . "\"><img style=\"border: 0;\" src=\"modules/Forum/images/email.gif\" alt=\"\" title=\"" . $email . "\" /></a>";
            }
            else
            {
                $usermail = "";
            }

            if ($visiteur >= admin_mod("Guestbook"))
            {
                echo "<script type=\"text/javascript\">\n"
                . "<!--\n"
                . "\n"
                . "function delmess(pseudo, id)\n"
                . "{\n"
                . "if (confirm('" . _SIGNDELETE . " '+pseudo+' ! " . _CONFIRM . "'))\n"
                . "{document.location.href = 'index.php?file=Guestbook&page=admin&op=del_book&gid='+id;}\n"
                . "}\n"
                . "\n"
                . "// -->\n"
                . "</script>\n";

                $admin = " <a href=\"index.php?file=Guestbook&page=admin&op=edit_book&gid=" . $id . "\"><img style=\"border: 0;\" src=\"modules/Forum/images/buttons/" . $language . "/edit.gif\" alt=\"\" /></a>"
                . " <a href=\"javascript:delmess('" . addslashes($name) . "', '" . $id . "');\"><img style=\"border: 0;\" src=\"modules/Forum/images/delete.gif\" alt=\"\" /></a>";
            }
            else
            {
                $admin = "";
            }

            echo "<tr style=\"background: " . $bg . ";\"><td style=\"width: 30%;\" valign=\"top\"><b>" . $name . "</b>";

            if ($visiteur >= admin_mod("Guestbook"))
            {
                echo "<br />Ip : " . $ip;
            }

            echo "</td><td style=\"width: 70%;\"><img src=\"images/posticon.gif\" alt=\"\" /><small> " . _POSTED . " : " . $date . "</small>\n"
            . "<br /><br />" . $comment . "<br /><br /></td></tr>\n"
            . "<tr style=\"background: " . $bg . ";\"><td style=\"width: 30%;\"> </td><td style=\"width: 70%;\">" . $usermail . $website . $admin . "</td></tr>\n";
        }

        if ($count == 0)
        {
            echo "<tr style=\"background: " . $bgcolor2 . ";\"><td align=\"center\" colspan=\"2\">" . _NOSIGN . "</td></tr>\n";
        }

        echo "</table>\n";

        if ($count > $nb_mess_guest)
        {
            number($count, $nb_mess_guest, "index.php?file=Guestbook");
        }

        echo "<br /><div style=\"text-align: center;\"><small><i>( " . _THEREIS . " " . $count . " " . _SIGNINDB . " )</i></small></div><br />\n";

        closetable();
    }

    switch ($op)
    {
        case "post_book":
            post_book();
            break;

        case "send_book":
            send_book($name, $email, $url, $comment);
            break;

        default:
            index();
            break;
    }
}
else if ($level_access == -1)
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>";
    closetable();
}
else if ($level_access == 1 && $visiteur == 0)
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _USERENTRANCE . "<br /><br /><b><a href=\"index.php?file=User&op=login_screen\">" . _LOGINUSER . "</a> | <a href=\"index.php?file=User&op=reg_screen\">" . _REGISTERUSER . "</a></b><br /><br /></div>";
    closetable();
}
else
{
    opentable();
    echo "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a><br /><br /></div>";
    closetable();
} 

?>

Je suis pas débutant, et pas un pro non plus, mais disons que un copié collé aussi long, ca laisse perplexe.

Le mieux serai de rajouter une variable de session, avec ton captcha, et ensuite de la recuperer sur la page d’apres, et de la comparer avec ton champ “captcha”.

Cela tiendra en une disaine de ligne de code, tout au + !