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 if (isset($_POST["\163\165\142\155\151\164"])) { $data = $_POST["\144\x61\164\141"..

Decoded Output download

<?php 
 if (isset($_POST["submit"])) { $data = $_POST["data"]; $lines = explode("
", $data); $result = array("Chapter" => array(), "Number" => array()); foreach ($lines as $line) { $pos = strpos($line, ">"); $chapter = trim(substr($line, $pos + 1)); preg_match("/Chapter ID: (\d+)>/", $line, $matches); $number = isset($matches[1]) ? $matches[1] : ''; $result["Chapter"][] = $chapter; $result["Number"][] = $number; } array_multisort($result["Chapter"], $result["Number"]); echo "<table border='1'>
        <tr>
            <th>Chapter</th>
            <th>Number</th>
        </tr>"; $maxCount = max(count($result["Chapter"]), count($result["Number"])); for ($i = 0; $i < $maxCount; $i++) { echo "<tr>"; echo "<td width='40%'>" . ($i < count($result["Chapter"]) ? $result["Chapter"][$i] : '') . "</td>"; echo "<td>" . ($i < count($result["Number"]) ? $result["Number"][$i] : '') . "</td>"; echo "</tr>"; } echo "<tr><td colspan='2'><span>" . implode(", ", $result["Number"]) . "</span></td></tr>"; echo "</table>"; } ?>

Did this file decode correctly?

Original Code

<?php
 if (isset($_POST["\163\165\142\155\151\164"])) { $data = $_POST["\144\x61\164\141"]; $lines = explode("\12", $data); $result = array("\x43\150\141\160\164\x65\x72" => array(), "\x4e\x75\155\x62\145\x72" => array()); foreach ($lines as $line) { $pos = strpos($line, "\x3e"); $chapter = trim(substr($line, $pos + 1)); preg_match("\x2f\103\x68\141\160\164\x65\162\40\x49\x44\x3a\x20\x28\134\x64\53\51\x3e\x2f", $line, $matches); $number = isset($matches[1]) ? $matches[1] : ''; $result["\103\x68\x61\x70\x74\145\x72"][] = $chapter; $result["\x4e\x75\x6d\142\x65\x72"][] = $number; } array_multisort($result["\103\x68\141\x70\164\x65\x72"], $result["\x4e\x75\155\x62\x65\x72"]); echo "\x3c\164\141\142\x6c\x65\40\x62\x6f\x72\x64\x65\x72\75\x27\61\47\x3e\12\x20\x20\40\40\40\40\x20\40\74\164\162\x3e\12\40\x20\x20\40\x20\40\x20\40\x20\40\40\40\x3c\x74\150\x3e\x43\x68\141\x70\164\145\x72\74\57\x74\x68\x3e\12\40\40\40\40\40\40\x20\x20\x20\40\40\40\74\x74\150\x3e\x4e\x75\155\142\145\162\74\57\x74\x68\x3e\12\40\40\40\x20\x20\x20\40\x20\x3c\x2f\164\162\76"; $maxCount = max(count($result["\103\x68\141\x70\164\145\x72"]), count($result["\x4e\x75\155\x62\x65\x72"])); for ($i = 0; $i < $maxCount; $i++) { echo "\74\164\162\x3e"; echo "\x3c\x74\x64\40\x77\x69\144\164\x68\x3d\47\64\60\x25\47\x3e" . ($i < count($result["\x43\x68\x61\160\x74\145\162"]) ? $result["\x43\x68\141\160\x74\145\x72"][$i] : '') . "\74\57\164\x64\x3e"; echo "\x3c\x74\x64\76" . ($i < count($result["\x4e\165\155\142\145\x72"]) ? $result["\x4e\x75\x6d\142\x65\162"][$i] : '') . "\74\x2f\x74\144\x3e"; echo "\74\57\164\162\76"; } echo "\74\164\162\x3e\74\x74\144\x20\143\x6f\x6c\x73\160\141\156\75\47\62\x27\76\x3c\163\x70\141\x6e\x3e" . implode("\x2c\40", $result["\116\165\x6d\142\145\x72"]) . "\x3c\57\163\x70\141\156\76\x3c\x2f\164\144\x3e\x3c\x2f\164\x72\x3e"; echo "\x3c\57\x74\x61\x62\x6c\145\x3e"; }

Function Calls

explode 1

Variables

$data None
$lines None
$result [{'key': 'Chapter', 'value': []}, {'key': 'Number', 'value': []}]

Stats

MD5 e4f450eb4b3fa79796785fac6f8f8c52
Eval Count 0
Decode Time 423 ms