$_GET[$key] = explode(",", $_GET[$key]); foreach ($_GET[$key] as $val) { if (array_key_exists($val, $value[1])) { $ar[] = $val; } } } else { $ar = explode(",", COption::GetOptionString("main", "CAPTCHA_" . $key, implode(",", $value[2]))); } $result[$key] = $ar; } } $cpt->SetTextTransparent(true, $result["transparentTextPercent"]); $cpt->SetBGColorRGB($result["arBGColor_1"], $result["arBGColor_2"]); $cpt->SetEllipsesNumber($result["numEllipses"]); $cpt->SetEllipseColorRGB($result["arEllipseColor_1"], $result["arEllipseColor_2"]); $cpt->SetLinesOverText($result["bLinesOverText"] === "Y"); $cpt->SetLinesNumber($result["numLines"]); $cpt->SetLineColorRGB($result["arLineColor_1"], $result["arLineColor_2"]); $cpt->SetTextWriting($result["textAngel_1"], $result["textAngel_2"], $result["textStartX"], $result["textDistance_1"], $result["textDistance_2"], $result["textFontSize"]); $cpt->SetTextColorRGB($result["arTextColor_1"], $result["arTextColor_2"]); $cpt->SetWaveTransformation($result["bWaveTransformation"] === "Y"); $cpt->SetEmptyText($result["bEmptyText"] === "Y"); $cpt->SetBorderColorRGB($result["arBorderColor"]); $cpt->SetTTFFonts($result["arTTFFiles"]); $arChars = array(); $l = strlen($result["letters"]); for ($i = 0; $i < $l; $i++) { $arChars[] = substr($result["letters"], $i, 1); } $cpt->SetCodeChars($arChars);