Development Captcha - Joungkyun/JSBoard GitHub Wiki

Captcha μ‚¬μš©

##1. captcha database

  • captcha directory 둜 μ΄λ™ν•˜μ—¬ php cli λ₯Ό μ΄μš©ν•˜μ—¬ database λ₯Ό μƒμ„±ν•œλ‹€.
[root@host captcha]$ php make_key.php
  • λ§Œμ•½ php cli κ°€ 없을 κ²½μš°μ—λŠ” λ‹€μŒμ˜ 방법을 μ΄μš©ν•œλ‹€.
[root@host jsboard]$ chmod 777 captcha
[root@host jsboard]$ chmod 644 captcha/make_key.php
[root@host jsboard]$ # browser둜 http://domain/jsboard/captcha/make_key.php 에 μ ‘κ·Ό
  • captcha 디렉토리에 captcha-number.db 파일이 생성이 λ˜μ—ˆλŠ”μ§€ 확인을 ν•œλ‹€.
  • 생성이 잘 λ˜μ—ˆμœΌλ©΄ λ‹€μŒμ˜ 과정을 μ§„ν–‰ν•œλ‹€.
[root@host jsboard]$  chmod 600 captcha/make_key.php
[root@host jsboard]$  chmod 755 captcha/

##2. Captcha 등둝

  • config/global.php 의 $board['captcha'] 에 μƒμ„±λœ νŒŒμΌμ„ λ“±λ‘ν•œλ‹€.
  • κ²½λ‘œλŠ” μƒλž΅ν•˜κ³  파일 μ΄λ¦„λ§Œ λ“±λ‘ν•œλ‹€.

<!> 둜그인 λͺ¨λ“œμ—μ„œλŠ” captcha κ°€ 좜λ ₯λ˜μ§€ μ•ŠλŠ”λ‹€.