This is a concise summary of the article Encoding and Decoding Encrypted PHP Code, which explains further the encoding/decoding examples presented here. These examples are a quick reference for those familar with PHP.
$string = 'Encoding and Decoding Encrypted PHP Code';
str_rot13($string)
: Rapbqvat naq Qrpbqvat Rapelcgrq CUC Pbqr
str_rot13(str_rot13($string))
: Encoding and Decoding Encrypted PHP Code
base64_encode($string)
: RW5jb2RpbmcgYW5kIERlY29kaW5nIEVuY3J5cHRlZCBQSFAgQ29kZQ==
base64_decode(base64_encode($string))
: Encoding and Decoding Encrypted PHP Code
gzdeflate($string)
: sÍKÎOÉÌKWHÌKQpI…r\ó’‹*JRS<œóSR
gzinflate(gzdeflate($string))
: Encoding and Decoding Encrypted PHP Code
Decoding strings that have been encoded with combinations of these functions look like this:
eval(gzinflate(base64_decode($string)));
eval(gzinflate(str_rot13(base64_decode($string))));
Depending on your experience level, decoding strings of this variety can be tricky. The easiest way to decode such a string is to use any reputable online decoding tool ;)
$date = Fri, 01 Nov 24 00:20:56 +0000;
str_rot13($date)
: Sev, 01 Abi 24 00:20:56 +0000
str_rot13(str_rot13($date))
: Fri, 01 Nov 24 00:20:56 +0000
base64_encode($date)
: RnJpLCAwMSBOb3YgMjQgMDA6MjA6NTYgKzAwMDA=
base64_decode(base64_encode($date))
: Fri, 01 Nov 24 00:20:56 +0000
gzdeflate($date)
: s+ÊÔQ00TðË/S02Q00°22°25SÐ6
gzinflate(gzdeflate($date))
: Fri, 01 Nov 24 00:20:56 +0000
For more information, see the original article, Encoding and Decoding Encrypted PHP Code.