Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); use OneClickCaptcha\Service\OneClickCaptchaServiceFacto..

Decoded Output download

<?php 
declare(strict_types=1); 
 
use OneClickCaptcha\Service\OneClickCaptchaServiceFactory; 
 
include __DIR__ . '/../vendor/autoload.php'; 
 
ini_set('display_errors', '1'); 
error_reporting(E_ALL); 
 
$OneClickCaptchaServiceFactory = new OneClickCaptchaServiceFactory(); 
$oneClickCaptcha = $OneClickCaptchaServiceFactory->getOneClickCaptcha(); 
 
// simple demonstration! 
$request = $_GET['get_captcha'] ?? ''; 
if ($request === 'true') { 
    try { 
        $oneClickCaptcha->showCaptcha(); 
    } catch (Exception $e) { 
        echo $e->getMessage(); 
    } 
} elseif (isset($_REQUEST['position'][0], $_REQUEST['position'][1])) { 
    if ($oneClickCaptcha->validate((int)$_REQUEST['position'][0], (int)$_REQUEST['position'][1])) { 
        echo '<h3>You are human!!</h3>'; 
    } else { 
        echo '<h3>Wrong!</h3>'; 
    } 
} 
 
// this is all html you need to validate captcha 
echo ' 
<form action="example.php" method="POST"> 
	<input type="image" src="example.php?get_captcha=true" name="position[]"/> 
</form> 
'; ?>

Did this file decode correctly?

Original Code

<?php
declare(strict_types=1);

use OneClickCaptcha\Service\OneClickCaptchaServiceFactory;

include __DIR__ . '/../vendor/autoload.php';

ini_set('display_errors', '1');
error_reporting(E_ALL);

$OneClickCaptchaServiceFactory = new OneClickCaptchaServiceFactory();
$oneClickCaptcha = $OneClickCaptchaServiceFactory->getOneClickCaptcha();

// simple demonstration!
$request = $_GET['get_captcha'] ?? '';
if ($request === 'true') {
    try {
        $oneClickCaptcha->showCaptcha();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
} elseif (isset($_REQUEST['position'][0], $_REQUEST['position'][1])) {
    if ($oneClickCaptcha->validate((int)$_REQUEST['position'][0], (int)$_REQUEST['position'][1])) {
        echo '<h3>You are human!!</h3>';
    } else {
        echo '<h3>Wrong!</h3>';
    }
}

// this is all html you need to validate captcha
echo '
<form action="example.php" method="POST">
	<input type="image" src="example.php?get_captcha=true" name="position[]"/>
</form>
';

Function Calls

None

Variables

None

Stats

MD5 6f139cb9de833d25fb7268dffdd5d11b
Eval Count 0
Decode Time 118 ms