arcaptcha
v1.0.2 : fix bug
arcaptcha 용 PHP 라이브러리. 이 패키지는 PHP 7.3+
지원합니다.
작곡가와 함께 이 패키지가 필요합니다.
composer require mohammadv184/ arcaptcha
API에서 SiteKey 및 SecretKey를 전달하여 새 인스턴스를 생성할 수 있습니다. https://arcaptcha.ir/dashboard에서 얻을 수 있습니다.
use Mohammadv184 arcaptcha arcaptcha ;
$ arcaptcha = new arcaptcha ( $ siteKey , $ secretKey );
arcaptcha 사용하는 방법.
양식에 arcaptcha 표시하려면 클래스를 사용하여 스크립트 태그와 위젯을 렌더링합니다.
<?php echo $ arcaptcha -> getScript () ?>
<form method="POST">
<?php echo $ arcaptcha -> getWidget () ?>
<input type="submit" value="Submit" />
</form>
게시 후 클래스를 사용하여 응답을 확인합니다. 당신은 true 또는 false를 얻습니다.
if ( $ arcaptcha -> verify ( $ _POST [ " arcaptcha -token " ])) {
echo " OK! " ;
} else {
echo " FAILED! " ;
}
MIT 라이센스(MIT). 자세한 내용은 라이센스 파일을 참조하십시오.