Exemplo n.º 1
0
<?php

error_reporting(0);
$captchaFile = $_REQUEST['captcha'];
//
if (isset($captchaFile)) {
    //$captchaFile = urldecode($captchaFile);
    //echo("Captcha File: $captchaFile<br>");
    require_once 'DeCaptcha.php';
    $results = '';
    $deCaptcha = new DeCaptcha('frostbyte07', 'Neeuq011$');
    $balance = $deCaptcha->getBalance();
    $results .= "Balance: {$balance} ";
    if ($balance > 0) {
        $results = $deCaptcha->getCatchaText($captchaFile);
        if (strlen($results) < 0) {
            $results = "Error: Couldn't not solve captcha";
            $deCaptcha->reportLastCatchaIncorrect();
        }
    } else {
        $results = "Error: No Balance Left To Solve Captcha";
    }
    echo $results;
} else {
    echo '<html><body>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript">
	function solveCaptcha(){
	$.ajax( {
		type :"GET",
		url :"DeCaptchaForm.php",