captcha.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php if (!class_exists('CaptchaConfiguration')) { return; }
  2. // BotDetect PHP Captcha configuration options
  3. // more details here: https://captcha.com/doc/php/captcha-options.html
  4. // ----------------------------------------------------------------------------
  5. return [
  6. /*
  7. |--------------------------------------------------------------------------
  8. | Captcha configuration for example page
  9. |--------------------------------------------------------------------------
  10. */
  11. 'ExampleCaptcha' => [
  12. 'UserInputID' => 'CaptchaCode',
  13. 'CodeLength' => 4,
  14. 'ImageWidth' => 250,
  15. 'ImageHeight' => 50,
  16. ],
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Captcha configuration for contact page
  20. |--------------------------------------------------------------------------
  21. */
  22. 'ContactCaptcha' => [
  23. 'UserInputID' => 'CaptchaCode',
  24. 'CodeLength' => CaptchaRandomization::GetRandomCodeLength(4, 6),
  25. 'ImageStyle' => ImageStyle::AncientMosaic,
  26. ],
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Captcha configuration for login page
  30. |--------------------------------------------------------------------------
  31. */
  32. 'LoginCaptcha' => [
  33. 'UserInputID' => 'CaptchaCode',
  34. 'CodeLength' => 3,
  35. 'ImageStyle' => [
  36. ImageStyle::Radar,
  37. ImageStyle::Collage,
  38. ImageStyle::Fingerprints,
  39. ],
  40. ],
  41. /*
  42. |--------------------------------------------------------------------------
  43. | Captcha configuration for register page
  44. |--------------------------------------------------------------------------
  45. */
  46. 'RegisterCaptcha' => [
  47. 'UserInputID' => 'CaptchaCode',
  48. 'CodeLength' => CaptchaRandomization::GetRandomCodeLength(3, 4),
  49. 'CodeStyle' => CodeStyle::Alpha,
  50. ],
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Captcha configuration for reset password page
  54. |--------------------------------------------------------------------------
  55. */
  56. 'ResetPasswordCaptcha' => [
  57. 'UserInputID' => 'CaptchaCode',
  58. 'CodeLength' => 2,
  59. 'CustomLightColor' => '#9966FF',
  60. ],
  61. // Add more your Captcha configuration here...
  62. ];