Last active
January 3, 2016 04:29
-
-
Save naeluh/8409545 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require ('mollom.php'); | |
Mollomss::setPublicKey('key'); | |
Mollomss::setPrivateKey('key'); | |
$servers = Mollomss::getServerList(); | |
Mollomss::setServerList($servers); | |
if(Mollomss::checkCaptcha($_POST[mollom_captcha_id], $_POST[mollom_captcha_val])){ | |
$passed = true; | |
echo 'That is the correct answer'; | |
}else{ | |
$passed = false; | |
echo'Sorry, we think you might be a spammer.'; | |
} | |
echo '<br>'; | |
echo 'passed ' . $passed; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mollomCaptcha() { | |
var mollom_captcha = $("#mollom_input"); | |
var mollom_captcha_id = $("#captcha_id"); | |
mollom_captcha.keyup(function () { | |
console.log(mollom_captcha.val()); | |
$.post("/mollom_check.php", { | |
mollom_captcha_val: mollom_captcha.val(), | |
mollom_captcha_id: mollom_captcha_id.val() | |
}, function (data) { | |
if ((data[0])){ | |
$("#mollom_check").html(data); | |
console.log(data); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment