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 goto ilttV; z4ixU: if (!function_exists("\x65\x6e\x74\x69\x74\151\x65\163\137\164\x..

Decoded Output download

<?php
 goto ilttV; z4ixU: if (!function_exists("entities_to_ascii")) { function entities_to_ascii($str, $all = TRUE) { if (preg_match_all("/\&#(\d+)\;/", $str, $matches)) { for ($i = 0, $s = count($matches[0]); $i < $s; $i++) { $digits = $matches[1][$i]; $out = ''; if ($digits < 128) { $out .= chr($digits); } elseif ($digits < 2048) { $out .= chr(192 + ($digits - $digits % 64) / 64) . chr(128 + $digits % 64); } else { $out .= chr(224 + ($digits - $digits % 4096) / 4096) . chr(128 + ($digits % 4096 - $digits % 64) / 64) . chr(128 + $digits % 64); } $str = str_replace($matches[0][$i], $out, $str); } } if ($all) { return str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"), array("&", "<", ">", """, "'", "-"), $str); } return $str; } } goto vzsqm; tIRCM: if (!function_exists("character_limiter")) { function character_limiter($str, $n = 500, $end_char = "&#8230;") { if (mb_strlen($str) < $n) { return $str; } $str = preg_replace("/ {2,}/", " ", str_replace(array("
", "
", "	", "", ""), " ", $str)); if (mb_strlen($str) <= $n) { return $str; } $out = ''; foreach (explode(" ", trim($str)) as $val) { $out .= $val . " "; if (mb_strlen($out) >= $n) { $out = trim($out); return mb_strlen($out) === mb_strlen($str) ? $out : $out . $end_char; } } } } goto cQLrd; cQLrd: if (!function_exists("ascii_to_entities")) { function ascii_to_entities($str) { $out = ''; $length = defined("MB_OVERLOAD_STRING") ? mb_strlen($str, "8bit") - 1 : strlen($str) - 1; for ($i = 0, $count = 1, $temp = array(); $i <= $length; $i++) { $ordinal = ord($str[$i]); if ($ordinal < 128) { if (count($temp) === 1) { $out .= "&#" . array_shift($temp) . ";"; $count = 1; } $out .= $str[$i]; } else { if (count($temp) === 0) { $count = $ordinal < 224 ? 2 : 3; } $temp[] = $ordinal; if (count($temp) === $count) { $number = $count === 3 ? $temp[0] % 16 * 4096 + $temp[1] % 64 * 64 + $temp[2] % 64 : $temp[0] % 32 * 64 + $temp[1] % 64; $out .= "&#" . $number . ";"; $count = 1; $temp = array(); } elseif ($i === $length) { $out .= "&#" . implode(";", $temp) . ";"; } } } return $out; } } goto z4ixU; yMO6U: if (!function_exists("word_limiter")) { function word_limiter($str, $limit = 100, $end_char = "&#8230;") { if (trim($str) === '') { return $str; } preg_match("/^\s*+(?:\S++\s*+){1," . (int) $limit . "}/", $str, $matches); if (strlen($str) === strlen($matches[0])) { $end_char = ''; } return rtrim($matches[0]) . $end_char; } } goto tIRCM; W9z1C: if (!function_exists("word_wrap")) { function word_wrap($str, $charlim = 76) { is_numeric($charlim) or $charlim = 76; $str = preg_replace("| +|", " ", $str); if (strpos($str, "\xd") !== FALSE) { $str = str_replace(array("\xd\xa", "\xd"), "\xa", $str); } $unwrap = array(); if (preg_match_all("|\{unwrap\}(.+?)\{/unwrap\}|s", $str, $matches)) { for ($i = 0, $c = count($matches[0]); $i < $c; $i++) { $unwrap[] = $matches[1][$i]; $str = str_replace($matches[0][$i], "{{unwrapped" . $i . "}}", $str); } } $str = wordwrap($str, $charlim, "\xa", FALSE); $output = ''; foreach (explode("
", $str) as $line) { if (mb_strlen($line) <= $charlim) { $output .= $line . "\xa"; continue; } $temp = ''; while (mb_strlen($line) > $charlim) { if (preg_match("!\[url.+\]|://|www\.!", $line)) { break; } $temp .= mb_substr($line, 0, $charlim - 1); $line = mb_substr($line, $charlim - 1); } if ($temp !== '') { $output .= $temp . "\xa" . $line . "
"; } else { $output .= $line . "
"; } } if (count($unwrap) > 0) { foreach ($unwrap as $key => $val) { $output = str_replace("{{unwrapped" . $key . "}}", $val, $output); } } return $output; } } goto gOeUu; FjmEQ: if (!function_exists("convert_accented_characters")) { function convert_accented_characters($str) { static $array_from, $array_to; if (!is_array($array_from)) { if (file_exists(APPPATH . "config/foreign_chars.php")) { include APPPATH . "config/foreign_chars.php"; } if (file_exists(APPPATH . "config/" . ENVIRONMENT . "/foreign_chars.php")) { include APPPATH . "config/" . ENVIRONMENT . "/foreign_chars.php"; } if (empty($foreign_characters) or !is_array($foreign_characters)) { $array_from = array(); $array_to = array(); return $str; } $array_from = array_keys($foreign_characters); $array_to = array_values($foreign_characters); } return preg_replace($array_from, $array_to, $str); } } goto W9z1C; vzsqm: if (!function_exists("word_censor")) { function word_censor($str, $censored, $replacement = '') { if (!is_array($censored)) { return $str; } $str = " " . $str . " "; $delim = "[-_'\"`(){}<>\[\]|!?@#%&,.:;^~*+=\/ 0-9\n\r\t]"; foreach ($censored as $badword) { $badword = str_replace("\*", "\w*?", preg_quote($badword, "/")); if ($replacement !== '') { $str = preg_replace("/({$delim})(" . $badword . ")({$delim})/i", "\1{$replacement}\3", $str); } elseif (preg_match_all("/{$delim}(" . $badword . "){$delim}/i", $str, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE)) { $matches = $matches[1]; for ($i = count($matches) - 1; $i >= 0; $i--) { $length = strlen($matches[$i][0]); $str = substr_replace($str, str_repeat("#", $length), $matches[$i][1], $length); } } } return trim($str); } } goto KFf9u; Ch2Am: if (!function_exists("highlight_phrase")) { function highlight_phrase($str, $phrase, $tag_open = "<mark>", $tag_close = "</mark>") { return $str !== '' && $phrase !== '' ? preg_replace("/(" . preg_quote($phrase, "/") . ")/i" . (UTF8_ENABLED ? "u" : ''), $tag_open . "\1" . $tag_close, $str) : $str; } } goto FjmEQ; KFf9u: if (!function_exists("highlight_code")) { function highlight_code($str) { $str = str_replace(array("&lt;", "&gt;", "<?", "?>", "<%", "%>", "\", "</script>"), array("<", ">", "phptagopen", "phptagclose", "asptagopen", "asptagclose", "backslashtmp", "scriptclose"), $str); $str = highlight_string("<?php " . $str . " ?>", TRUE); $str = preg_replace(array("/<span style="color: #([A-Z0-9]+)">&lt;\?php(&nbsp;| )/i", "/(<span style="color: #[A-Z0-9]+">.*?)\?&gt;<\/span>\n<\/span>\n<\/code>/is", "/<span style="color: #[A-Z0-9]+"\><\/span>/i"), array("<span style="color: #$1">", "$1</span>\xa</span>
</code>", ''), $str); return str_replace(array("phptagopen", "phptagclose", "asptagopen", "asptagclose", "backslashtmp", "scriptclose"), array("&lt;?", "?&gt;", "&lt;%", "%&gt;", "\", "&lt;/script&gt;"), $str); } } goto Ch2Am; ilttV: defined("BASEPATH") or die("No direct script access allowed"); goto yMO6U; gOeUu: if (!function_exists("ellipsize")) { function ellipsize($str, $max_length, $position = 1, $ellipsis = "&hellip;") { $str = trim(strip_tags($str)); if (mb_strlen($str) <= $max_length) { return $str; } $beg = mb_substr($str, 0, floor($max_length * $position)); $position = $position > 1 ? 1 : $position; if ($position === 1) { $end = mb_substr($str, 0, -($max_length - mb_strlen($beg))); } else { $end = mb_substr($str, -($max_length - mb_strlen($beg))); } return $beg . $ellipsis . $end; } } ?>

Did this file decode correctly?

Original Code

<?php
 goto ilttV; z4ixU: if (!function_exists("\x65\x6e\x74\x69\x74\151\x65\163\137\164\x6f\x5f\x61\163\x63\x69\151")) { function entities_to_ascii($str, $all = TRUE) { if (preg_match_all("\x2f\x5c\x26\x23\x28\134\144\53\x29\134\73\x2f", $str, $matches)) { for ($i = 0, $s = count($matches[0]); $i < $s; $i++) { $digits = $matches[1][$i]; $out = ''; if ($digits < 128) { $out .= chr($digits); } elseif ($digits < 2048) { $out .= chr(192 + ($digits - $digits % 64) / 64) . chr(128 + $digits % 64); } else { $out .= chr(224 + ($digits - $digits % 4096) / 4096) . chr(128 + ($digits % 4096 - $digits % 64) / 64) . chr(128 + $digits % 64); } $str = str_replace($matches[0][$i], $out, $str); } } if ($all) { return str_replace(array("\46\x61\155\160\x3b", "\x26\154\164\x3b", "\x26\147\164\73", "\x26\161\x75\157\164\x3b", "\x26\141\160\157\163\73", "\x26\43\64\x35\x3b"), array("\46", "\x3c", "\76", "\x22", "\x27", "\55"), $str); } return $str; } } goto vzsqm; tIRCM: if (!function_exists("\143\x68\x61\x72\x61\143\164\x65\162\x5f\x6c\x69\155\151\x74\x65\162")) { function character_limiter($str, $n = 500, $end_char = "\x26\x23\70\62\63\60\73") { if (mb_strlen($str) < $n) { return $str; } $str = preg_replace("\x2f\x20\173\62\x2c\175\x2f", "\40", str_replace(array("\15", "\12", "\11", "\13", "\14"), "\40", $str)); if (mb_strlen($str) <= $n) { return $str; } $out = ''; foreach (explode("\40", trim($str)) as $val) { $out .= $val . "\x20"; if (mb_strlen($out) >= $n) { $out = trim($out); return mb_strlen($out) === mb_strlen($str) ? $out : $out . $end_char; } } } } goto cQLrd; cQLrd: if (!function_exists("\141\163\143\151\x69\137\164\157\x5f\x65\156\164\x69\164\x69\145\x73")) { function ascii_to_entities($str) { $out = ''; $length = defined("\115\102\137\117\x56\x45\122\114\117\x41\104\x5f\123\124\x52\x49\x4e\107") ? mb_strlen($str, "\x38\142\x69\x74") - 1 : strlen($str) - 1; for ($i = 0, $count = 1, $temp = array(); $i <= $length; $i++) { $ordinal = ord($str[$i]); if ($ordinal < 128) { if (count($temp) === 1) { $out .= "\x26\43" . array_shift($temp) . "\x3b"; $count = 1; } $out .= $str[$i]; } else { if (count($temp) === 0) { $count = $ordinal < 224 ? 2 : 3; } $temp[] = $ordinal; if (count($temp) === $count) { $number = $count === 3 ? $temp[0] % 16 * 4096 + $temp[1] % 64 * 64 + $temp[2] % 64 : $temp[0] % 32 * 64 + $temp[1] % 64; $out .= "\46\43" . $number . "\x3b"; $count = 1; $temp = array(); } elseif ($i === $length) { $out .= "\x26\x23" . implode("\x3b", $temp) . "\x3b"; } } } return $out; } } goto z4ixU; yMO6U: if (!function_exists("\x77\x6f\162\144\x5f\154\151\x6d\x69\x74\145\x72")) { function word_limiter($str, $limit = 100, $end_char = "\x26\x23\70\62\63\60\73") { if (trim($str) === '') { return $str; } preg_match("\x2f\136\134\163\52\53\50\x3f\72\134\x53\53\53\134\163\52\x2b\x29\173\x31\x2c" . (int) $limit . "\175\x2f", $str, $matches); if (strlen($str) === strlen($matches[0])) { $end_char = ''; } return rtrim($matches[0]) . $end_char; } } goto tIRCM; W9z1C: if (!function_exists("\x77\x6f\x72\144\x5f\x77\x72\141\160")) { function word_wrap($str, $charlim = 76) { is_numeric($charlim) or $charlim = 76; $str = preg_replace("\x7c\x20\x2b\x7c", "\x20", $str); if (strpos($str, "\xd") !== FALSE) { $str = str_replace(array("\xd\xa", "\xd"), "\xa", $str); } $unwrap = array(); if (preg_match_all("\x7c\x5c\173\165\x6e\167\x72\x61\x70\x5c\x7d\50\56\x2b\x3f\x29\x5c\173\57\x75\156\x77\x72\141\x70\x5c\175\174\x73", $str, $matches)) { for ($i = 0, $c = count($matches[0]); $i < $c; $i++) { $unwrap[] = $matches[1][$i]; $str = str_replace($matches[0][$i], "\x7b\x7b\165\156\x77\x72\x61\x70\x70\x65\x64" . $i . "\175\x7d", $str); } } $str = wordwrap($str, $charlim, "\xa", FALSE); $output = ''; foreach (explode("\12", $str) as $line) { if (mb_strlen($line) <= $charlim) { $output .= $line . "\xa"; continue; } $temp = ''; while (mb_strlen($line) > $charlim) { if (preg_match("\x21\x5c\133\x75\x72\154\56\53\134\135\x7c\x3a\x2f\x2f\174\167\167\167\x5c\56\x21", $line)) { break; } $temp .= mb_substr($line, 0, $charlim - 1); $line = mb_substr($line, $charlim - 1); } if ($temp !== '') { $output .= $temp . "\xa" . $line . "\12"; } else { $output .= $line . "\12"; } } if (count($unwrap) > 0) { foreach ($unwrap as $key => $val) { $output = str_replace("\x7b\x7b\x75\x6e\x77\x72\x61\x70\160\145\144" . $key . "\175\x7d", $val, $output); } } return $output; } } goto gOeUu; FjmEQ: if (!function_exists("\143\157\x6e\166\x65\x72\164\137\x61\143\x63\145\156\x74\145\144\x5f\143\150\x61\x72\x61\x63\x74\x65\162\x73")) { function convert_accented_characters($str) { static $array_from, $array_to; if (!is_array($array_from)) { if (file_exists(APPPATH . "\x63\157\x6e\x66\151\147\57\146\157\162\145\x69\147\x6e\137\x63\150\141\x72\x73\56\x70\x68\160")) { include APPPATH . "\x63\157\x6e\x66\x69\x67\57\x66\x6f\x72\145\x69\147\156\137\x63\x68\141\x72\x73\x2e\x70\150\160"; } if (file_exists(APPPATH . "\143\x6f\156\x66\151\147\x2f" . ENVIRONMENT . "\57\146\x6f\x72\x65\151\147\x6e\x5f\x63\150\x61\162\x73\56\x70\x68\x70")) { include APPPATH . "\143\157\156\146\x69\147\57" . ENVIRONMENT . "\57\146\x6f\162\x65\151\x67\x6e\x5f\x63\x68\141\x72\x73\x2e\160\x68\160"; } if (empty($foreign_characters) or !is_array($foreign_characters)) { $array_from = array(); $array_to = array(); return $str; } $array_from = array_keys($foreign_characters); $array_to = array_values($foreign_characters); } return preg_replace($array_from, $array_to, $str); } } goto W9z1C; vzsqm: if (!function_exists("\167\157\x72\x64\x5f\x63\145\x6e\x73\x6f\x72")) { function word_censor($str, $censored, $replacement = '') { if (!is_array($censored)) { return $str; } $str = "\x20" . $str . "\x20"; $delim = "\133\x2d\x5f\47\134\42\140\x28\x29\x7b\175\x3c\x3e\x5c\133\x5c\x5d\x7c\41\x3f\x40\x23\x25\46\x2c\x2e\x3a\x3b\x5e\x7e\52\53\75\x5c\57\x20\60\55\71\134\x6e\x5c\162\134\x74\x5d"; foreach ($censored as $badword) { $badword = str_replace("\x5c\52", "\134\x77\x2a\77", preg_quote($badword, "\x2f")); if ($replacement !== '') { $str = preg_replace("\57\50{$delim}\x29\x28" . $badword . "\x29\x28{$delim}\x29\57\151", "\x5c\61{$replacement}\134\63", $str); } elseif (preg_match_all("\57{$delim}\x28" . $badword . "\x29{$delim}\57\151", $str, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE)) { $matches = $matches[1]; for ($i = count($matches) - 1; $i >= 0; $i--) { $length = strlen($matches[$i][0]); $str = substr_replace($str, str_repeat("\x23", $length), $matches[$i][1], $length); } } } return trim($str); } } goto KFf9u; Ch2Am: if (!function_exists("\x68\x69\x67\x68\154\x69\147\x68\x74\x5f\x70\x68\x72\x61\163\x65")) { function highlight_phrase($str, $phrase, $tag_open = "\x3c\x6d\x61\162\x6b\x3e", $tag_close = "\74\x2f\x6d\141\162\x6b\x3e") { return $str !== '' && $phrase !== '' ? preg_replace("\x2f\x28" . preg_quote($phrase, "\x2f") . "\x29\57\151" . (UTF8_ENABLED ? "\x75" : ''), $tag_open . "\134\61" . $tag_close, $str) : $str; } } goto FjmEQ; KFf9u: if (!function_exists("\150\x69\147\150\154\x69\x67\150\x74\137\x63\157\x64\145")) { function highlight_code($str) { $str = str_replace(array("\46\x6c\164\x3b", "\46\147\164\x3b", "\x3c\x3f", "\x3f\x3e", "\x3c\x25", "\x25\76", "\134", "\x3c\x2f\163\143\x72\151\x70\164\x3e"), array("\74", "\76", "\160\150\160\x74\141\x67\x6f\160\x65\x6e", "\x70\x68\x70\x74\x61\147\143\x6c\x6f\x73\x65", "\x61\163\x70\164\141\147\x6f\x70\145\x6e", "\x61\163\x70\164\x61\147\x63\x6c\x6f\163\145", "\x62\x61\x63\x6b\x73\x6c\x61\163\x68\x74\x6d\x70", "\x73\143\162\x69\x70\164\x63\x6c\157\x73\x65"), $str); $str = highlight_string("\x3c\77\160\150\160\x20" . $str . "\40\77\76", TRUE); $str = preg_replace(array("\57\x3c\163\x70\141\156\x20\x73\x74\x79\x6c\145\75\x22\x63\x6f\x6c\x6f\x72\72\x20\x23\50\133\x41\55\132\x30\x2d\71\x5d\53\51\x22\76\46\x6c\x74\x3b\134\77\x70\150\160\x28\x26\x6e\x62\x73\160\73\x7c\40\51\x2f\151", "\x2f\50\74\163\x70\x61\x6e\40\x73\164\171\x6c\x65\75\42\x63\x6f\x6c\x6f\162\72\40\x23\x5b\x41\55\x5a\60\x2d\71\135\x2b\42\76\56\52\x3f\x29\134\x3f\46\x67\164\73\74\134\57\x73\x70\141\156\x3e\x5c\156\74\134\x2f\x73\x70\141\156\76\134\156\x3c\x5c\x2f\143\157\x64\x65\x3e\x2f\x69\163", "\x2f\74\163\x70\141\x6e\x20\163\164\171\x6c\x65\75\x22\x63\x6f\154\157\162\72\40\43\133\101\55\132\60\55\71\135\x2b\42\x5c\76\74\x5c\57\x73\x70\141\156\76\x2f\x69"), array("\74\163\x70\x61\156\40\x73\164\171\x6c\x65\x3d\42\x63\157\154\x6f\x72\72\x20\43\x24\x31\42\x3e", "\x24\61\74\57\163\160\x61\x6e\76\xa\74\57\163\x70\x61\x6e\x3e\12\x3c\57\143\157\x64\145\x3e", ''), $str); return str_replace(array("\160\x68\160\164\141\147\157\x70\x65\x6e", "\160\x68\x70\164\141\147\143\x6c\x6f\163\x65", "\141\163\x70\x74\141\x67\157\x70\145\x6e", "\x61\163\x70\164\141\x67\x63\154\x6f\x73\145", "\x62\x61\143\153\x73\154\x61\163\150\x74\x6d\x70", "\x73\143\162\x69\x70\164\x63\x6c\157\x73\x65"), array("\x26\154\x74\x3b\77", "\x3f\46\147\x74\73", "\46\154\x74\73\x25", "\45\x26\x67\x74\x3b", "\x5c", "\x26\x6c\164\x3b\x2f\x73\x63\x72\x69\x70\164\x26\x67\164\x3b"), $str); } } goto Ch2Am; ilttV: defined("\x42\101\x53\105\x50\x41\124\110") or die("\x4e\x6f\40\x64\x69\x72\145\143\164\40\163\143\x72\151\x70\x74\40\141\x63\x63\x65\x73\x73\x20\141\154\x6c\x6f\167\145\x64"); goto yMO6U; gOeUu: if (!function_exists("\145\x6c\154\x69\160\x73\151\x7a\x65")) { function ellipsize($str, $max_length, $position = 1, $ellipsis = "\x26\150\x65\154\x6c\x69\x70\73") { $str = trim(strip_tags($str)); if (mb_strlen($str) <= $max_length) { return $str; } $beg = mb_substr($str, 0, floor($max_length * $position)); $position = $position > 1 ? 1 : $position; if ($position === 1) { $end = mb_substr($str, 0, -($max_length - mb_strlen($beg))); } else { $end = mb_substr($str, -($max_length - mb_strlen($beg))); } return $beg . $ellipsis . $end; } }

Function Calls

None

Variables

None

Stats

MD5 f52f1a379c969195fcaf7f14f576c5d0
Eval Count 0
Decode Time 110 ms