자동등록방지(스팸방지) 배경색 / 글자색 바꾸기 ^^ 정보
자동등록방지(스팸방지) 배경색 / 글자색 바꾸기 ^^
본문
질문과 답변에 어떤분이 질문하셨길래 찾으시는 분들 있을것 같아 글 남깁니다.
이거 뒷북인가요? ^^
/bbs/kcaptcha_config.php 32라인에 보시면 아래와 같은 코드가 있습니다.
==================================================
# CAPTCHA image colors (RGB, 0-255)
//$foreground_color = array(0, 0, 0);
//$background_color = array(220, 230, 255);
$foreground_color = array(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
$background_color = array(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
==================================================
위의 코드에서 아래 2줄은 랜덤하게 글자색과 배경색이 만들어집니다.
고정된 글자색과 배경색을 원하시면 아래의 2줄은 주석처리하시고
바로위의 두줄을 주석해제하시고 array(220, 230, 255) 이부분의 숫자를
R,G,B 칼라숫자 조합으로 변경해 주시면 됩니다. ^^
RGB 색상표의 코드는 포토샵 등에서 칼라찍어보시면 R,G,B 코드 잘 나옵니다. ^^
아니면 첨부한 코드표 참조하셔도 되구요 ^^
예를 들어 글자는 흰색(255,255,255) 배경색은 검정색(0,0,0) 으로 한다면
아래와 같이 수정하시면 되겠네요 ^^
==================================================
# CAPTCHA image colors (RGB, 0-255)
$foreground_color = array(255,255,255);
$background_color = array(0,0,0);
//$foreground_color = array(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
//$background_color = array(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
==================================================

이거 뒷북인가요? ^^
/bbs/kcaptcha_config.php 32라인에 보시면 아래와 같은 코드가 있습니다.
==================================================
# CAPTCHA image colors (RGB, 0-255)
//$foreground_color = array(0, 0, 0);
//$background_color = array(220, 230, 255);
$foreground_color = array(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
$background_color = array(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
==================================================
위의 코드에서 아래 2줄은 랜덤하게 글자색과 배경색이 만들어집니다.
고정된 글자색과 배경색을 원하시면 아래의 2줄은 주석처리하시고
바로위의 두줄을 주석해제하시고 array(220, 230, 255) 이부분의 숫자를
R,G,B 칼라숫자 조합으로 변경해 주시면 됩니다. ^^
RGB 색상표의 코드는 포토샵 등에서 칼라찍어보시면 R,G,B 코드 잘 나옵니다. ^^
아니면 첨부한 코드표 참조하셔도 되구요 ^^
예를 들어 글자는 흰색(255,255,255) 배경색은 검정색(0,0,0) 으로 한다면
아래와 같이 수정하시면 되겠네요 ^^
==================================================
# CAPTCHA image colors (RGB, 0-255)
$foreground_color = array(255,255,255);
$background_color = array(0,0,0);
//$foreground_color = array(mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
//$background_color = array(mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));
==================================================

추천
6
6
댓글 6개
감사합니다...원하는색으로 바꾸었네요...

^^ 좋은 하루 되세요..!! ^^
감사합니다.
감사합니다...
자동등록방지(스팸방지) 배경색 / 글자색 바꾸기 ^^

오..멋지십니다.^^ 잘 사용할께요.