ASCII (text) to binary
Fill in the form, dinglefritz! ;)\n");
}
// Looks good, so clean up data
$text = urldecode(stripslashes($text));
// Make copy of original text for later display
$orig_text = htmlspecialchars($text);
// Time to process the form
$convert = $_POST['convert'];
if ($convert == "txt2bin") {
// Convert from text to binary
$text = txt2bin($text);
} elseif ($convert == "bin2txt") {
// Convert from binary to text
$text = bin2txt($text);
} else {
// This shouldn't happen
die("
Hmmm. Now THAT'S no good. How about go back and try again?
\n"); } // Display result //echo("$orig_text converts to:
\n"); //echo("$text
\n"); } else { // Form has not been submitted, so display greeting echo("Please enter your text below:
Post Comment
Please Login to Post a Comment.
Ratings