<?PHP function put_char($char,$rgb,$posx,$posy) { } function confirm($string) { 'font'=>'cactus_plain', // nazwa pliku z fontem ttf (bez rozszerzenia), nie moze zawierac spacji! 'fontpath'=>'.', // polozenie pliku z fontem 'image'=>'captcha.png', // nazwa obrazka typu PNG uzywanego jako background 'light'=>30, // jasnosc napisu, 100=bialy, 0=czarny 'saturation'=>90, // nasycenie koloru napisu, 0=szary, 100=najbardziej nasycony 'alpha'=>30, // przezroczystosc napisu, 0=bez przezroczystosci, 100=calkowicie transparentny 'imageheight'=>100, 'imagewidth'=>360 ); //$im = imagecreatefrompng($config['image']); $im = imagecreatetruecolor($config['imagewidth'], $config['imageheight']); if ($im) { $white = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 1, 1, $config['imagewidth']-2, $config['imageheight']-2, $white); $maxfontheight=$config['imageheight']*0.7; $minfontheight=$config['imageheight']*0.4; for ($i=0; $i<50; $i++) { $color = imagecolorallocatealpha($im, $rgb[0], $rgb[1],$rgb[2],$config['alpha']); imagettftext( $im, $fontheight, $angle, $posx, $posy, $color, $config['font'], chr(mt_rand(ord('A'),ord('Z'))) ); } $rgb=hls2rgb($textcolor,$config['light'],$config['saturation']); $color = imagecolorallocatealpha($im, $rgb[0], $rgb[1],$rgb[2],$config['alpha']); for ($i=0; $i<strlen($string); $i++) { $py = ($config['imageheight']+$fontheight)/2; imagettftext( $im, $fontheight, $angle, $posx, $py, $color, $config['font'], $string[$i] ); } $color = imagecolorallocate($im, 0, 0,0); // imagettftext( $im, 10, 0, 5, 15, $color, $config['font'], 'Fsck all SEO spammers!' ); imagestring($im, 1,5, 5, 'Fsck all SEO spammers!', $color); imagepng($im); imagedestroy($im); } else } function XRGB($hh, $mm1, $mm2) { // funkcja pomocnicza $hh=$hh%360; if ($hh < 60) return $mm1 + ($mm2 - $mm1) * $hh / 60; elseif ($hh < 180) return $mm2; elseif ($hh < 240) return $mm1 + ($mm2 - $mm1) * (240 - $hh) / 60; else return $mm1; } function hls2rgb($h,$l,$s) { $il = ($l%100) / 100; $ih = ($h%360); $is = ($s%100) / 100; if ($il <= 0.5) $m2 = $il * (1 + $is); else $m2 = $il + $is - $il * $is; $m1 = 2*$il - $m2; if ($s == 0) { $ir = $il; $ig = $il; $ib = $il; } else { $ir = XRGB($ih + 120, $m1, $m2); $ig = XRGB($ih , $m1, $m2); $ib = XRGB($ih - 120, $m1, $m2); } } //confirm((strtoupper(!empty($_GET['txt'])?$_GET['txt']:'captcha'))); ?>
(kod nie jest mój) i zanic nie mogę połączyć tego z formularzem rejestracji.
Wie ktoś jak to połączyć





Albo zna ktoś jakiś gotowiec, bo ja szukam i nic nie mogę znaleźdź

