Hello.
I want to integrate the Funcaptcha in my Toplist but im lost with this:
PHP
In your PHP code where you are validating your form, you will need to pass your private key and the value of “fc-token” to the FunCaptcha API server either via POST or GET:
	
	
	
		
Wehre do i have to place this pls?
This is an Example:
	
	
	
		
								I want to integrate the Funcaptcha in my Toplist but im lost with this:
PHP
In your PHP code where you are validating your form, you will need to pass your private key and the value of “fc-token” to the FunCaptcha API server either via POST or GET:
		Code:
	
	$private_key="_YOUR_PRIVATE_KEY_";
$session_token=$_POST["fc-token"];
$fc_api_url="https://funcaptcha.com/fc/v/?private_key=".$private_key."&session_token=".$session_token."&simple_mode=1";
if(file_get_contents($fc_api_url)==="1"){
//valid, the user has solved FunCaptcha correctly
}else{
//invalid, the user has failed FunCaptcha
}
	This is an Example:
		Code:
	
	<?php
if ($_POST) {
    $private_key = "_YOUR_PRIVATE_KEY_";
    $session_token = $_POST["fc-token"];
    $fc_api_url = "https://funcaptcha.com/fc/v/?private_key=".$private_key."&session_token=".$session_token."&simple_mode=1";
    if (file_get_contents($fc_api_url) === "1") {
        //valid, the user has solved FunCaptcha correctly
    } else {
        //invalid, the user has failed FunCaptcha
    }
}
?><html>
<head>
<script src="https://funcaptcha.com/fc/api/" async defer></script>
</head>
    <body>
        <form method="post">
            <div id="funcaptcha" data-pkey="_YOUR_PUBLIC_KEY_"></div>
            <input type="submit">
        </form>
    </body>
</html>
	
								
									Last edited: