to use iris captcha you need to first register a captcha for you domain, then tokens and
Ids you
need will be produces and you can use it.
add js file at the end of body
exactly before it closes.
...
<script src="https://captcha.irisdev.net/js/{:CaptchaUniqID}" > </script>
</body>
then use <iris-captcha />
any where you want. for instance
...<form action="path/to/any" method="POST" >
<input type="text" name="Name" ... />
...
<iris-captcha name="irisCaptcha" />
<button type="submit" value="Submit" > </button>
</form>
...
if you want to check verification status you can call checkValidity()
like
this
let captchaValidationStatus = document.getElementById("irisCaptcha").checkValidity() // true , false
let captchaUserResponse = document.getElementById("irisCaptcha").value() // Response with Signature
if( captchaValidationStatus ) {
axios.post(url,data).then(...)
...
}
you have 2 option for user-Response verification,
you should send a post request to https://captcha.irisdev.net/check
whit
the body
of in the form of form Data.
{
response string // the User Response that you get it from the posted form - is a JWT
secret string // your application Secret provided in your panel at https://my.irisdev.net
remoteip string // (Optional) the user Remote IP
}
{
Code int // the Error Code 200 is OK / others shows Error
Message string // error Message
hostname string // the hostname of the site where the Iris-Captcha was solved
success bool // true | false
}
the user response is JWT with Algorithm of RS256 with the payload of
{
"success": true, // the Captcha Solvation Status - true | false
"hostname": "example.tld", // the hostname of the site where the reCAPTCHA was solved ( your hostname )
"ip": "18.175.68.116", // the user remote IP
"exp": 1603318472, // Expiration Time - Seconds Since Unix epoch
"iat": 1603318172 // Issued At - Seconds Since Unix epoch
}
for verification you need published Public-Key which is accessible throw curl https://captcha.irisdev.net/publickey > irisCaptcha.pub.pem
or you can manually add as constant in your codes.
You can see and Download Iris-Captcha from GitHub
Releases.
Simply include "path/to/irisCaptchaLib.php"
and use it.
You Can Simply Install Iris Captcha in your server. we have an Installer for it.
for installation instruction follow up the usage tab of your service panel at my.irisdev.net .
the difficulty of your captcha extremely depend on your pictures, choosing simple Image
may
causes to be solvable for robots .
the picture you choosing shouldn't contains overall corrected lines.
take a look at this pictures.
they are solvable for robots because most of the lines and edges in the image shows
corrected
orientation.
read more at here
in the other hand the images that contain many noises and lines that are meaningful for
humans
makes the captcha to be harder for bots and easy for humans.
take a look at this pictures.
register to newsletter subscription if you are interested in similar blogs.
we are going to get deep