Jump to content

Erro no captcha no site


Recommended Posts

Abra o arquivo captcha.php e substitua o código por:



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

 // $ttf = "./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, 5, 8, 5,  $_SESSION["captcha_id"], $weisser);  // Prints the random number von the image

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



Edited by xkillmt2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...