"; unset($potentialmessage); } if ($messagepart == '03'){ $potentialmessage2[] = implode('', $potentialmessage); echo "
"; unset($potentialmessage); } if ($messagepart == '04'){ // If the byte matches "04", we create another potential message array, // and smash all the potential message parts together. $potentialmessage2[] = implode('', $potentialmessage); // This will echo a break after the potential message has been gone through. echo "
"; // Then we unset the potential message array to begin working with a new one. unset($potentialmessage); } if ($messagepart == '05'){ $potentialmessage2[] = implode('', $potentialmessage); echo "
"; unset($potentialmessage); } // This removed two from the message, and then increases the counter. $message = substr($message, 2); $bytechecks += 1; } echo "
"; // This echoes each message that we have recieved. foreach ($potentialmessage2 as $msg){ // Set the "small length" $smaller = 20; // Here we check for smaller messages that might be hidden inside. if (substr($msg, -2) == '02'){ $max = 14; $length = strlen($msg) / 2 - 1; while ($length > $max){ // Another message inside (or multiple) $smallermessage[] = substr($msg, 0, $smaller); $msg = substr($msg, $smaller); $length = strlen($msg) / 2 - 1; } } // Here we check for smaller messages that might be hidden inside. if (substr($msg, -2) == '03'){ $max = 18; $length = strlen($msg) / 2 - 1; //echo $length; while ($length > $max){ // Another message inside (or multiple) $smallermessage[] = substr($msg, 0, $smaller); $msg = substr($msg, $smaller); $length = strlen($msg) / 2 - 1; } } // Here we check for smaller messages that might be hidden inside. if (substr($msg, -2) == '04'){ $max = 22; $length = strlen($msg) / 2 - 1; //echo $length; while ($length > $max){ // Another message inside (or multiple) $smallermessage[] = substr($msg, 0, $smaller); $msg = substr($msg, $smaller); $length = strlen($msg) / 2 - 1; } } // Here we check for smaller messages that might be hidden inside. if (substr($msg, -2) == '05'){ $max = 26; $length = strlen($msg) / 2 - 1; //echo $length; while ($length > $max){ // Another message inside (or multiple) $smallermessage[] = substr($msg, 0, $smaller); $msg = substr($msg, $smaller); $length = strlen($msg) / 2 - 1; } } echo "".$msg."
"; } foreach ($smallermessage as $smallmsg){ echo "".$smallmsg."
"; } ?>