Novembre 2016
Changement de l'hideux panneau Portfolio, amélioration de la version mobile
This commit is contained in:
16
photos/reCaptcha.php
Normal file
16
photos/reCaptcha.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$captcha;
|
||||
if(!$captcha){
|
||||
echo '<h2>Please check the the captcha form.</h2>';
|
||||
exit;
|
||||
}
|
||||
$secretKey = "6LcQoikTAAAAAJDpBG26Np_GScnTLmjTkDC8fvDY";
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
|
||||
$responseKeys = json_decode($response,true);
|
||||
if(intval($responseKeys["success"]) !== 1) {
|
||||
echo '<h2>You are spammer ! Get the @$%K out</h2>';
|
||||
} else {
|
||||
echo '<h2>Thanks for posting comment.</h2>';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user