rendered paste bodyforeach(glob("phpbb-captcha/*.png") as $imageValue){ $images[$i]["resource"] = imagecreatefrompng($imageValue); $images[$i]["path"] = $imageValue; $i++;}$crackedString = ""foreach($captchas as $captcha){ $bestFit = 0; $height = imagesy($captcha); $width = imagesx($captcha); for($i=0;$i<count($images);$i++){ $sum=0; for($x=0;$x<$width;$x++) { for($y=0;$y<$height;$y++) { print $image["resource"]; $pixelValue = imagecolorat($captcha,$x,$y); $pixelValue_ = imagecolorat($images[$i]["resource"],$x,$y); if($pixelValue == $pixelValue_){$sum++;} } } if($sum > $bestFit){ $bestFit = $sum; $char=$images[$i]["path"];} } preg_match("@/([\d\w])@",$char,$match); $crackedString .= $match[1];}return $crackedString;