Skip to content
This repository was archived by the owner on Jul 30, 2022. It is now read-only.
dimvicPublic archive

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

1. Set the environment variables

  • hcaptcha_sitekey
  • hcaptcha_secret
  • hcaptcha_log_path if you want responses to be logged

Using putenv('key=value'), $_ENV['key'] = 'value' or $_SERVER['key'] = 'value'

Alternatively, class methods can be called with the key/secret as parameters.

Logging is possible only by setting the environment variable.

2. Include hCaptcha in a form

dimvic\HCaptcha::getDiv(?string $siteKey = null): string

or

dimvic\HCaptcha::getHiddenInput(?string $siteKey = null): string

3. Validate the result

dimvic\HCaptcha::validate(?string $token = null, ?string $remoteIp = null, ?string $secret = null): bool

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages