Skocz do zawartości

Dołącz do społeczności!

👋 Witaj na MPCForum!

Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

  • ✅ Pełny dostęp do działów i ukrytych treści
  • ✅ Możliwość pisania i odpowiadania w tematach
  • ✅ System prywatnych wiadomości
  • ✅ Zbieranie reputacji i rozwijanie swojego profilu
  • ✅ Członkostwo w jednej z największych społeczności graczy

👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

Zarejestruj się teraz

[Pytanie]Jak usunąć kod captcha?

Rekomendowane odpowiedzi

Opublikowano

tak jak w temacie jak usunąć kod captcha bo mi sie wyświetla i nie moge sie zarejestrować stronę pobrałem z

http://www.mpcforum.pl/topic/338543-dlstrona-www/

 

podam zawartość pliku register.php

	<p>Rejestracja</p>
</div>
   <div id="middle_con">
<?PHP

 $regCoins = 0; // Startcoins

 $laufZeit = 365; //Tage autoloot,safebox
 $calcLZ = (60*60*24)*365;
 $expireStamp = time()+$calcLZ;
 $expireDate = date("Y-m-d H:i:s",$expireStamp);

 if($serverSettings['register_on'] && (!isset($_SESSION['user_admin']) && !checkInt($_SESSION['user_admin']) && !$_SESSION['user_admin']>=0)) {

   if(isset($_POST['submit']) && $_POST['submit']=="Registrer") {
     if((checkAnum($_POST['account']) && strlen($_POST['account'])>=6 && strlen($_POST['account'])<=16) && checkAnum($_POST['pass'])  && strlen($_POST['pass'])>=8 && strlen($_POST['pass2'])<=16 && !empty($_POST['pass2']) && (checkName($_POST['uname']) && strlen($_POST['uname'])>=3 && strlen($_POST['uname'])<=20) && $_POST['pass']==$_POST['pass2'] && checkMail($_POST['email']) && strlen($_POST['email'])<=40 && $_POST['captcha']==$_SESSION['captcha_id'] && $_POST['email']==$_POST['email2'] && (checkAnum($_POST['sicherheitsa']) && strlen($_POST['sicherheitsa'])>=3 && strlen($_POST['sicherheitsa'])<=16) && checkInt($_POST['sicherheitsf']) && (checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7)) {

       $hashSF = md5($_POST['sicherheitsa']);
       $sfNum = mysql_real_escape_string($_POST['sicherheitsf']);
       $lcode = mysql_real_escape_string($_POST['loeschcode']);

       $zuFall = rand(99999,999999999);
       $userpass=mysql_real_escape_string($_POST['pass']);

       $aktivHash = ($serverSettings['mail_activation']) ? md5($zuFall):'';
       $accountStatus = ($serverSettings['mail_activation']) ? 'BLOCK':'OK';

       $sqlCmd = "INSERT INTO account.account 
       (login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert) 
       VALUES 
       ('".$_POST['account']."',PASSWORD('".$userpass."'),'".mysql_real_escape_string($_POST['uname'])."','".mysql_real_escape_string($_POST['email'])."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','".$accountStatus."','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')";
       $sqlQry = mysql_query($sqlCmd,$sqlServ);
       if($sqlQry) {


         $absender = $serverSettings['titel']." Rejestracja";
         $email = $serverSettings['reg_mail'];
         $empfaenger = $_POST['email'];
         $mail_body = "Hallo ".$_POST['uname'].",

         twoja rejestracja ".$serverSettings['titel']." przebiegla pomyslnie! Aby moc sie zalogowac musisz potwierdzic rejestracje.
         Aby potwierdzic rejestracje wejdź w ponizszy link:

         ".$serverSettings['url']."/index.php?s=login&do=aktivieren&hash=".$aktivHash."

         Twoje dany:
         Login: ".$_POST['account']."
         Haslo: ".$userpass."

         Kod usuniecia postaci: ".$lcode."
         Pytanie pomocnicze: ".$sFrage[$sfNum]."
         Odpowiedź: ".$_POST['sicherheitsa']."

         zyczymy milej gry,

         Wasz ".$serverSettings['titel']."-Team


         Ten e-mail zostal wygenerowany automatycznie, prosimy na niego nie odpowiadac.";
         $titel = ". ".$serverSettings['titel'];

         $header = "X-Priority: 3\n";
         $header .= "X-Mailer: ".$serverSettings['titel']." Homepage Mailer\n";
         $header .= "MIME-Version: 1.0\n";
         $header .= "From: ".$absender." <".$serverSettings['reg_mail'].">\n";
         $header .= "Reply-To: ".$serverSettings['reg_mail']."\n";
         $header .= "Content-Type: text/plain; charset=iso-8859-1\n";


         if($serverSettings['mail_activation']) {
           mail($empfaenger, $titel, $mail_body, $header);
           echo'<p class="meldung">Account erfolgreich angelegt. Bitte überprüfen Sie Ihr Postfach, um die Registrierung zu bestätigen.</p>';
         }
         else {
           echo'<p class="meldung">Account erfolgreich angelegt. Sie können sich nun anmelden.</p>';
         }

       }
       else {
         echo'<p class="meldung">Rejestracja nieudana, takie konto juz istnieje.</p>';
       }

     }
     else {
       echo'<p class="meldung">Rejestracja nieudana, wypelnij wszystkie pola.</p>';
     }
   }
 ?>
   <p>Wszystkie pola musza zostac wypelnione.<?PHP if($serverSettings['mail_activation']) { echo'<br/><b>Wymagana aktywacja e-mail, prosimy o podawanie dzialajacego e-maila!</b>'; } ?></p>
   <form action="index.php?s=register" method="POST">
     <table>
       <tr>
         <th>Login:</th>
         <td><input class="bar" type="text" name="account" maxlength="16" size="16" title="6-16 Zeichen (nur a-Z,0-9)"/></td>
       </tr>
       <tr>
         <th>Imie:</th>
         <td><input class="bar" type="text" name="uname" maxlength="16" size="16" title="3-20 Zeichen (nur a-Z,0-9)"/></td>
       </tr>
       <tr>
         <th>Haslo:</th>
         <td><input class="bar" type="password" name="pass" maxlength="16" size="16" title="8-16 Zeichen (nur a-Z,0-9)"/></td>
       </tr>
       <tr>
         <th>Powtorz haslo:</th>
         <td><input class="bar" type="password" name="pass2" maxlength="16" size="16" title="Passwort wiederholen"/></td>
       </tr>
       <tr>
         <th>E-Mail:</th>
         <td><input class="bar" type="text" name="email" maxlength="50" size="25" title="max. 40 Zeichen"/></td>
       </tr>
       <tr>
         <th>Powtorz e-mail:</th>
         <td><input class="bar" type="text" name="email2" maxlength="50" size="25" title="E-Mail wiederholen"/></td>
       </tr>
       <tr>
         <th>Kod usuniecia postaci:</th>
         <td><input class="bar" type="text" name="loeschcode" maxlength="7" size="7" title="7 Zeichen (nur a-Z,0-9)"/></td>
       </tr>
       <tr>
         <th>Pytanie:</th>
         <td>
           <select title="Pytanie wählen" class="bar" name="sicherheitsf">
             <?PHP
               foreach($sFrage AS $fragew => $frage) {
                 echo'<option value="'.$fragew.'">'.$frage.'</option>';
               }
             ?>
           </select>
		</td>
		</tr>
		<tr>
		<th>Odpowiedz:</th>
		<td>
           <input class="bar" type="text" name="sicherheitsa" maxlength="16" size="16" title="3-16 Zeichen (nur a-Z,0-9)"/>
         </td>
       </tr>
                <th>Captcha:</th>
         <td><img src="./captcha/captcha.php" title="Captcha"/> <input title="Captcha-code eingeben" class="bar" type="text" name="captcha" maxlength="5" size="5"/></td>
       </tr>
   <tr>
       </tr>
       <tr>
         <th style="text-align:center;" colspan="2"><input class="blogin" type="submit" name="submit" value="Rejestruj"/> <input class="blogin" type="reset" value="Reset"/></th>
       </tr>
     </table>
   </form>
 <?PHP
 }
 else {
   echo'<p class="meldung">Rejestracja wylaczona, poczekaj az zostanie aktywowana aby zalozyc konto.</p>';
 }
?>

 

 

i captcha.php :

<?PHP
 session_name("m2hp");
 session_start();

 header("Content-Type: image/png");                                // Sets the Content of this file to an PNG-Image

 $ttf = "./captcha/franconi.ttf";                                          //Schriftart 

 $_SESSION["captcha_id"] = "";                                     // Clears the old value

 $zufallszahl = mt_rand(50000,60000);                              // Generates a random number between 50000 and 60000

 $_SESSION["captcha_id"] = $zufallszahl;                           // Sets the value of the session

 $bild = imagecreatefromgif("bg.gif");                             // Creates a new image from background file

 $weisser = imagecolorallocate($bild, 255, 255, 255);              // Sets white text color

 imagettftext($bild, 11, 10, 5, 20, $weisser, $ttf, $_SESSION["captcha_id"]); 
 //imagestring($bild, 3, 8, 6,  $_SESSION["captcha_id"], $weisser);  // Prints the random number von the image

 ImagePNG($bild);                                                  // Output for the generated image
?>

 

może coś zepsute jest

Edytowane przez PavloX

Opublikowano

1. Usun captcha.php ze swojej strony.

 

2. Usun ta zawartosc z index.php

 

 

 

 

<?php

session_start();

 

 

$captcha = $_SESSION['captcha_key'];

if ($_POST['button']){

$value = $_POST['value'];

 

echo "$value - $captcha";

}

else

echo "<form action='index.php' method='post'>

<input type='text' name='value'>

<img src='captcha.php'></img><br>

<input type='submit' name='button' value='Submit'>

</form>";

 

?>"

 

 

 

 

 

 

 

@Byc moze zle mowie, to przepraszam, ale zdaje mi sie ze tak to ma byc.. ;dd

 

 

 

Edytowane przez Rumuniasty

1320412030-U418656.png

Opublikowano

Wszystko pięknie opisanie, tylko po co usuwać to? Chcesz, żeby masowe boty się rejestrowały, a potem będziesz miał zapełnioną bazę... wystarczy, że jakiś hacker się wkurzy na Ciebie ^^

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.