本文整理汇总了PHP中CCaptcha::SetEllipsesNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP CCaptcha::SetEllipsesNumber方法的具体用法?PHP CCaptcha::SetEllipsesNumber怎么用?PHP CCaptcha::SetEllipsesNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCaptcha
的用法示例。
在下文中一共展示了CCaptcha::SetEllipsesNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CCaptcha
<?php
if (!Defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$HTTP_ACCEPT_ENCODING = "";
$_SERVER["HTTP_ACCEPT_ENCODING"] = "";
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
$cpt = new CCaptcha();
$cpt->setImageSize(240, 80);
$cpt->SetBorderColor(array(255, 255, 255));
$cpt->SetEllipseColor(array("#5daac9"));
$cpt->SetEllipsesNumber(6);
$cpt->textStartX = 45;
$cpt->textFontSize = 50;
if (isset($_GET["captcha_sid"])) {
if ($cpt->InitCode($_GET["captcha_sid"])) {
$cpt->Output();
} else {
$cpt->OutputError();
}
} elseif (isset($_GET["captcha_code"])) {
$captchaPass = COption::GetOptionString("main", "captcha_password", "");
if ($cpt->InitCodeCrypt($_GET["captcha_code"], $captchaPass)) {
$cpt->Output();
} else {
$cpt->OutputError();
}
} else {
$cpt->OutputError();
}
示例2: explode
if (array_key_exists($key, $_GET)) {
$_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);
}
示例3: CCaptcha
<?php
define("NO_KEEP_STATISTIC", "Y");
define("NO_AGENT_STATISTIC", "Y");
define("NOT_CHECK_PERMISSIONS", true);
$HTTP_ACCEPT_ENCODING = "";
$_SERVER["HTTP_ACCEPT_ENCODING"] = "";
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
$cpt = new CCaptcha();
if ($_REQUEST['captcha_sid']) {
$cpt->SetImageSize(150, 35);
$cpt->SetLinesNumber(0);
$cpt->SetEllipsesNumber(0);
$cpt->SetTextColor(array(array(0, 0), array(0, 0), array(0, 0)));
$cpt->SetTextWriting($cpt->angleFrom, $cpt->angleTo, 5, 20, 26, 18);
$cpt->SetBorderColorRGB("ffffff");
if (isset($_GET["captcha_sid"])) {
if ($cpt->InitCode($_GET["captcha_sid"])) {
$cpt->Output();
} else {
$cpt->OutputError();
}
} elseif (isset($_GET["captcha_code"])) {
$captchaPass = COption::GetOptionString("main", "captcha_password", "");
if ($cpt->InitCodeCrypt($_GET["captcha_code"], $captchaPass)) {
$cpt->Output();
} else {
$cpt->OutputError();
}
} else {