
Mein Captcha..
-
-
Ich würde den gern haben !! :D:D Geile sache
-
Sieht nich schlecht aus aber
Greife ich das Captcha direkt sprich Background.php reicht das auch aus um diesen Mechanisums zuumgehen
-
ne theoretisch reicht der nicht aus.. man müsste das besser zusammen flicken.. aber hatte da keine lust zu in dem moment
könnt ihr ja "weiterentwickeln" habe grade 2 andere projekte am start..
werde den source mal posten .. morgen oder sound.. wenn ihrs zusamm geflickt habt schreibt den source bitte xDD
-
Aufrufende datei:
PHP- <?phpsession_start();include("cccc.php");if(empty($_SESSION["code"])){ $_SESSION["code"]=setCode();}$code=";foreach($_SESSION["code] as $item){ $code.=$item;} $var_X=$_POST['Submit'];$var_Z=$_POST['Code']; echo "<table width=\"150\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"images.php\"> <tr> <td><img src=\"das.gif\" height=\"50\" width=\"150\"></td> </tr> </table> <form id=\"form1\" name=\"form1\" method=\"post\" action=\"".$_SERVER['PHP_SELF']."\"> <label> <input type=\"text\" name=\"Code\" id=\"Code\" /> </label> <label> <input type=\"submit\" name=\"Submit\" value=\"Test\" /> </label> </form>"; echo "<pre>"; //var_dump($code); echo "</pre>"; if($var_X==Test") { if($var_Z==$code){ echo "erfolg."; $_SESSION["code]=''; }else echo "kein erfolg."; }?>
Funktionen datei:
PHP- <?php
- function setCode(){
- $imgstrarr=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","1","2","3","4","5","6","7","8","9","0");
- $imgstrarr_max=count($imgstrarr);
- for($i==0;$i<6;$i++){
- $zeichen[$i]=$imgstrarr[rand(0,$imgstrarr_max)];
- }
- return $zeichen;
- }
- function setImg($code){
- header("Content-Type: image/png");
- $img = imagecreatetruecolor(150, 50);
- $zeichen=$code;
- $white = imagecolorallocate($img,255,255,255);
- $black = imagecolorallocate($img,0,0,0);
- imagefill($img,0,0,$white);
- imagerectangle($img,3,3,147,47,$black);
- imagefill($img,1,1,$black);
- $x=rand(5,55);
- $y=rand(5,30);
- $size=rand(2,5);
- for($j==0;$j<6;$j++){
- imagestring($img,5,$x,$y,$zeichen[$j],imagecolorallocate($img,rand(0,200),rand(0,200),rand(0,200)));
- $x=$x+15;
- $y=rand(5,30);
- $size=rand(2,5);
- }
- for($k==0;$k<4;$k++){
- $mm=rand(0,1);
- if($mm==1)
- imageline($img,3,rand(3,47),147,rand(3,47),imagecolorallocate($img,rand(0,200),rand(0,200),rand(0,200)));
- else
- imageline($img,rand(3,147),3,rand(3,147),47,imagecolorallocate($img,rand(0,200),rand(0,200),rand(0,200)));
- }
- return $img;
- }
- ?>