Location: PHPKode > scripts > CodeBreak - Hidden Morse Code > codebreak-hidden-morse-code/decode_text.inc.php
<?php
$search_characters_first = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
if ($_POST["encode_method"] == "upper") {
    $replace_characters_first = array(".", "^", " ", "^", "-", "-", " ", "..", ".", ".", "..", ".", "..", "..", " ", "^", " ", "^", " ", "-", "..", "..", "...", "..", "..", "-");
} elseif ($_POST["encode_method"] == "lower") {
    $replace_characters_first = array("..", "^", " ", "^", "-", ".", " ", "..", ".", " ", "..", "-", "...", "..", " ", ".", " ", "..", " ", ".", " ", ".", "..", "..", ".", "-");
}
$output_text = str_replace("\r\n", "", $input_text);  // remove all newlines from string
$working_character_first = substr($output_text, 0, 1);
$working_character_second = substr($output_text, -1);
if (($working_character_first == "B" or $working_character_first == "D" or $working_character_first == "P" or $working_character_first == "R") && ($working_character_second == "B" or $working_character_second == "D" or $working_character_second == "P" or $working_character_second == "R")) {
    include("decode_morse.inc.php");
} else {
    $output_text = "*** INVALID ENTRY ***";
}
?>
Return current item: CodeBreak - Hidden Morse Code