Hey leute,
also ich Programmiere grad für michn Capture.
Leider klappt die Passwort abfrage grad net so wie Sie soll
Bild wird angezeigt.
Code:
index.php
und von capture.php
Normalerweise sollte es ja kein problem sein, aber ich find grad den Fehler net
also ich Programmiere grad für michn Capture.
Leider klappt die Passwort abfrage grad net so wie Sie soll
Bild wird angezeigt.
Code:
index.php
Code:
<?php
echo "<center><img src='capture.php'>";
echo "<form method='post'><input type='text' name='Capture' size='28'><br><input type='submit'></form></center>";
$POSTCAPTURE = md5(md5(htmlspecialchars($_POST['Capture']))."CapturecopyrightbyPho3niX");
if(htmlspecialchars($_COOKIE['Capture']) == $POSTCAPTURE){
echo "true";
}
else{
echo "false";
}
echo $_COOKIE['Capture']."<br>";
echo $POSTCAPTURE;
?>
und von capture.php
Code:
<?php
Header("Content-Type: image/png");
$width = 200;
$height = 75;
$img = ImageCreate($width, $height);
$white = ImageColorAllocate($img, 127, 127, 127);
$red = ImageColorAllocate($img, 255, 255, 255);
ImageFill($img, 0, 0, $white);
$var_1_1 = rand(1,150);
$var_1_2 = rand(1,150);
$var_2_1 = rand(1,120);
$var_2_2 = rand(1,120);
$var_3_1 = rand(100,200);
$var_3_2 = rand(100,200);
$var_4_1 = rand(1,50);
$var_4_2 = rand(1,50);
$var_5_1 = rand(1,50);
$var_5_2 = rand(100,350);
$var_6_1 = rand(100,350);
$var_6_2 = rand(1,50);
ImageArc($img, $var_1_1, $var_2_1, $var_3_1, $var_4_1, $var_5_2, $var_6_1, $red);
ImageArc($img, $var_1_2, $var_2_2, $var_3_2, $var_4_2, $var_5_2, $var_6_2, $red);
$var_1_1 = rand(1,150);
$var_1_2 = rand(1,150);
$var_2_1 = rand(1,120);
$var_2_2 = rand(1,120);
$var_3_1 = rand(100,200);
$var_3_2 = rand(100,200);
$var_4_1 = rand(1,50);
$var_4_2 = rand(1,50);
$var_5_1 = rand(1,50);
$var_5_2 = rand(100,350);
$var_6_1 = rand(100,350);
$var_6_2 = rand(1,50);
ImageArc($img, $var_1_1, $var_2_1, $var_3_1, $var_4_1, $var_5_2, $var_6_1, $red);
ImageArc($img, $var_1_2, $var_2_2, $var_3_2, $var_4_2, $var_5_2, $var_6_2, $red);
$var_1_1 = rand(1,150);
$var_1_2 = rand(1,150);
$var_2_1 = rand(1,120);
$var_2_2 = rand(1,120);
$var_3_1 = rand(100,200);
$var_3_2 = rand(100,200);
$var_4_1 = rand(1,50);
$var_4_2 = rand(1,50);
$var_5_1 = rand(1,50);
$var_5_2 = rand(100,350);
$var_6_1 = rand(100,350);
$var_6_2 = rand(1,50);
ImageArc($img, $var_1_1, $var_2_1, $var_3_1, $var_4_1, $var_5_2, $var_6_1, $red);
ImageArc($img, $var_1_2, $var_2_2, $var_3_2, $var_4_2, $var_5_2, $var_6_2, $red);
//Textegenerator
$font_size_pic_1 = rand(3,5);
$font_size_pic_2 = rand(3,5);
$away_from_left_1 = rand(1,130);
$away_from_left_2 = rand(1,130);
$away_from_above_1 = rand(1,30);
$away_from_above_2 = rand(40,60);
//Text generieren
$array = array(0=>"a",1=>"b",2=>"b",3=>"c",4=>"d",5=>"e",6=>"f",7=>"g",8=>"h",9=>"i",10=>"j",11=>"k",12=>"l",13=>"m",14=>"n",15=>"o",16=>"p",17=>"q",18=>"r",19=>"s",20=>"t",21=>"u",22=>"v",23=>"w",24=>"x",25=>"y",26=>"z",27=>"0",28=>"1",29=>"2",30=>"3",31=>"4",32=>"5",33=>"6",34=>"7",35=>"8",36=>"9");
$size_of_Text1 = rand(5,10);
for($abgearbeitet = 0; $abgearbeitet <= $size_of_Text1; $abgearbeitet++){
$Buchstabe_Zahl_zufaellig = rand(0,36);
$capture_text_1 .= $array["$Buchstabe_Zahl_zufaellig"];
}
$size_of_Text2 = rand(5,10);
for($abgearbeitet2 = 0; $abgearbeitet2 <= $size_of_Text2; $abgearbeitet2++){
$Buchstabe_Zahl_zufaellig2 = rand(0,36);
$capture_text_2 .= $array["$Buchstabe_Zahl_zufaellig2"];
}
$crypted_capture = md5(md5($capture_text_1." ".$capture_text_1)."CapturecopyrightbyPho3niX");
setcookie ("Capture", $crypted_capture , time() + 3600);
ImageString($img, $font_size_pic_1, $away_from_left_1, $away_from_above_1, $capture_text_1, $red);
ImageString($img, $font_size_pic_2, $away_from_left_2, $away_from_above_2, $capture_text_2, $red);
ImagePNG($img);
ImageDestroy($img);
?>
Normalerweise sollte es ja kein problem sein, aber ich find grad den Fehler net