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 class WP_Http_Encoding { public static function compress($raw, $level = 9, $support..

Decoded Output download

<?php
 class WP_Http_Encoding { public static function compress($raw, $level = 9, $supports = null) { return gzdeflate($raw, $level); } public static function decompress($compressed, $length = null) { if (empty($compressed)) { return $compressed; } if (false !== ($decompressed = @gzinflate($compressed))) { return $decompressed; } if (false !== ($decompressed = self::compatible_gzinflate($compressed))) { return $decompressed; } if (false !== ($decompressed = @gzuncompress($compressed))) { return $decompressed; } if (function_exists("gzdecode")) { $decompressed = @gzdecode($compressed); if (false !== $decompressed) { return $decompressed; } } return $compressed; } public static function compatible_gzinflate($gzData) { if (substr($gzData, 0, 3) == "\37\x8b\10") { $i = 10; $flg = ord(substr($gzData, 3, 1)); if ($flg > 0) { if ($flg & 4) { list($xlen) = unpack("v", substr($gzData, $i, 2)); $i = $i + 2 + $xlen; } if ($flg & 8) { $i = strpos($gzData, "\x0", $i) + 1; } if ($flg & 16) { $i = strpos($gzData, "\x0", $i) + 1; } if ($flg & 2) { $i = $i + 2; } } $decompressed = @gzinflate(substr($gzData, $i, -8)); if (false !== $decompressed) { return $decompressed; } } $decompressed = @gzinflate(substr($gzData, 2)); if (false !== $decompressed) { return $decompressed; } return false; } public static function accept_encoding($url, $args) { $type = array(); $compression_enabled = self::is_available(); if (!$args["decompress"]) { $compression_enabled = false; } elseif ($args["stream"]) { $compression_enabled = false; } elseif (isset($args["limit_response_size"])) { $compression_enabled = false; } if ($compression_enabled) { if (function_exists("gzinflate")) { $type[] = "deflate;q=1.0"; } if (function_exists("gzuncompress")) { $type[] = "compress;q=0.5"; } if (function_exists("gzdecode")) { $type[] = "gzip;q=0.5"; } } $type = apply_filters("wp_http_accept_encoding", $type, $url, $args); return implode(", ", $type); } public static function content_encoding() { return "deflate"; } public static function should_decode($headers) { if (is_array($headers)) { if (array_key_exists("content-encoding", $headers) && !empty($headers["content-encoding"])) { return true; } } elseif (is_string($headers)) { return stripos($headers, "content-encoding:") !== false; } return false; } public static function is_available() { return function_exists("gzuncompress") || function_exists("gzdeflate") || function_exists("gzinflate"); } } ?>

Did this file decode correctly?

Original Code

<?php
 class WP_Http_Encoding { public static function compress($raw, $level = 9, $supports = null) { return gzdeflate($raw, $level); } public static function decompress($compressed, $length = null) { if (empty($compressed)) { return $compressed; } if (false !== ($decompressed = @gzinflate($compressed))) { return $decompressed; } if (false !== ($decompressed = self::compatible_gzinflate($compressed))) { return $decompressed; } if (false !== ($decompressed = @gzuncompress($compressed))) { return $decompressed; } if (function_exists("\147\x7a\x64\145\143\157\144\x65")) { $decompressed = @gzdecode($compressed); if (false !== $decompressed) { return $decompressed; } } return $compressed; } public static function compatible_gzinflate($gzData) { if (substr($gzData, 0, 3) == "\37\x8b\10") { $i = 10; $flg = ord(substr($gzData, 3, 1)); if ($flg > 0) { if ($flg & 4) { list($xlen) = unpack("\x76", substr($gzData, $i, 2)); $i = $i + 2 + $xlen; } if ($flg & 8) { $i = strpos($gzData, "\x0", $i) + 1; } if ($flg & 16) { $i = strpos($gzData, "\x0", $i) + 1; } if ($flg & 2) { $i = $i + 2; } } $decompressed = @gzinflate(substr($gzData, $i, -8)); if (false !== $decompressed) { return $decompressed; } } $decompressed = @gzinflate(substr($gzData, 2)); if (false !== $decompressed) { return $decompressed; } return false; } public static function accept_encoding($url, $args) { $type = array(); $compression_enabled = self::is_available(); if (!$args["\144\145\143\x6f\155\160\162\x65\163\x73"]) { $compression_enabled = false; } elseif ($args["\x73\x74\162\145\141\x6d"]) { $compression_enabled = false; } elseif (isset($args["\154\151\x6d\151\x74\137\x72\145\163\160\157\x6e\x73\145\137\163\151\172\x65"])) { $compression_enabled = false; } if ($compression_enabled) { if (function_exists("\x67\x7a\151\x6e\x66\x6c\141\164\145")) { $type[] = "\144\145\146\x6c\141\x74\x65\x3b\161\75\61\x2e\60"; } if (function_exists("\147\172\x75\156\143\x6f\155\160\x72\145\163\163")) { $type[] = "\x63\x6f\x6d\x70\x72\145\x73\163\x3b\x71\75\60\56\x35"; } if (function_exists("\147\x7a\x64\145\x63\x6f\x64\145")) { $type[] = "\147\172\151\160\73\161\75\x30\x2e\x35"; } } $type = apply_filters("\x77\x70\137\150\x74\164\x70\137\x61\x63\143\145\160\164\137\x65\x6e\143\x6f\x64\151\x6e\147", $type, $url, $args); return implode("\x2c\x20", $type); } public static function content_encoding() { return "\x64\x65\146\154\141\164\145"; } public static function should_decode($headers) { if (is_array($headers)) { if (array_key_exists("\x63\157\x6e\x74\145\156\x74\55\145\156\x63\x6f\144\x69\156\147", $headers) && !empty($headers["\143\157\x6e\164\x65\x6e\164\x2d\145\x6e\x63\x6f\144\151\x6e\147"])) { return true; } } elseif (is_string($headers)) { return stripos($headers, "\x63\157\x6e\164\145\156\x74\x2d\x65\x6e\x63\x6f\x64\151\x6e\147\72") !== false; } return false; } public static function is_available() { return function_exists("\147\x7a\x75\156\143\157\155\x70\162\145\x73\x73") || function_exists("\x67\x7a\144\x65\x66\154\x61\x74\145") || function_exists("\x67\x7a\151\156\146\154\141\x74\x65"); } }

Function Calls

None

Variables

None

Stats

MD5 58101dda464d05628f4eccebee858ccc
Eval Count 0
Decode Time 89 ms