Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Un message codé pour Indy
<?php
$message1 = "0@sn9sirppa@#?ia'jgtvryko1";
// var_dump($message1);
$messageKey = strlen($message1)/2;
// var_dump($messageKey);
$firstDecode = substr($message1, 5,$messageKey);
// var_dump($firstDecode);
$replaceDecode = str_replace('@#?',' ',$firstDecode);
// var_dump($replaceDecode);
$finalDecode = strrev($replaceDecode);
var_dump($finalDecode);
$message2 = 'q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj';
// var_dump($message2);
$messageKey2 = strlen($message2)/2;
// var_dump($messageKey2);
$firstDecode2 = substr($message2, 5, $messageKey2);
// var_dump($firstDecode2);
$replaceDecode2 = str_replace('@#?',' ', $firstDecode2);
// var_dump($replaceDecode2);
$finalDecode2 = strrev($replaceDecode2);
var_dump($finalDecode2);
$message3 = 'aopi?sgnirts@#?sedhtg+p9l!';
// var_dump($message3);
$messageKey3 = strlen($message3)/2;
// var_dump($messageKey3);
$firstDecode3 = substr($message3, 5, $messageKey3);
// var_dump($firstDecode3);
$replaceDecode3 = str_replace('@#?', ' ', $firstDecode3);
// var_dump($replaceDecode3);
$finalDecode3 = strrev($replaceDecode3);
var_dump($finalDecode3);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.