strtoupper($_POST['a']), 'B' => strtoupper($_POST['b']), 'C' => strtoupper($_POST['c']), 'D' => strtoupper($_POST['d']), 'E' => strtoupper($_POST['e']), 'F' => strtoupper($_POST['f']), 'G' => strtoupper($_POST['g']), 'H' => strtoupper($_POST['h']), 'I' => strtoupper($_POST['i']), 'J' => strtoupper($_POST['j']), 'K' => strtoupper($_POST['k']), 'L' => strtoupper($_POST['l']), 'M' => strtoupper($_POST['m']), 'N' => strtoupper($_POST['n']), 'O' => strtoupper($_POST['o']), 'P' => strtoupper($_POST['p']), 'Q' => strtoupper($_POST['q']), 'R' => strtoupper($_POST['r']), 'S' => strtoupper($_POST['s']), 'T' => strtoupper($_POST['t']), 'U' => strtoupper($_POST['u']), 'V' => strtoupper($_POST['v']), 'W' => strtoupper($_POST['w']), 'X' => strtoupper($_POST['x']), 'Y' => strtoupper($_POST['y']), 'Z' => strtoupper($_POST['z']), ); $allLetBack = array( strtoupper($_POST['a']) => 'A', strtoupper($_POST['b']) => 'B', strtoupper($_POST['c']) => 'C', strtoupper($_POST['d']) => 'D', strtoupper($_POST['e']) => 'E', strtoupper($_POST['f']) => 'F', strtoupper($_POST['g']) => 'G', strtoupper($_POST['h']) => 'H', strtoupper($_POST['i']) => 'I', strtoupper($_POST['j']) => 'J', strtoupper($_POST['k']) => 'K', strtoupper($_POST['l']) => 'L', strtoupper($_POST['m']) => 'M', strtoupper($_POST['n']) => 'N', strtoupper($_POST['o']) => 'O', strtoupper($_POST['p']) => 'P', strtoupper($_POST['q']) => 'Q', strtoupper($_POST['r']) => 'R', strtoupper($_POST['s']) => 'S', strtoupper($_POST['t']) => 'T', strtoupper($_POST['u']) => 'U', strtoupper($_POST['v']) => 'V', strtoupper($_POST['w']) => 'W', strtoupper($_POST['x']) => 'X', strtoupper($_POST['y']) => 'Y', strtoupper($_POST['z']) => 'Z', ); $phrase = strtoupper($_POST['crypto']); $boolEncrypt = $_POST['enc']; $bPhrase = ""; if ($boolEncrypt){ for($x = 0; $x <= strlen($phrase); $x++){ if (isset($allLetBack[$phrase{$x}])){ $bPhrase = $bPhrase . $allLetBack[$phrase{$x}]; } else { $bPhrase = $bPhrase . $phrase{$x}; } } } else { for($x = 0; $x <= strlen($phrase); $x++){ if (isset($allLet[$phrase{$x}])){ $bPhrase = $bPhrase . $allLet[$phrase{$x}]; } else { $bPhrase = $bPhrase . $phrase{$x}; } } } $phrase = $bPhrase ?>
This tool was designed to allow you to enter some text and fill in the code and either check an existing cryptogram or create one.
If you are trying to check a cypher, just copy and paste the encrypted text into the form and then fill out the real letters that the code letters stand for. Click 'Submit' and the text will change to the unencrypted version. If there are any errors, then you know that the cypher was incorrect.
If you want to create a cryptogram, type your phrase into the form, fill out your code, and check 'Create'. Click 'Submit' and you will have your cryptogram.
To download the source code for this tool, and for other neat things, visit www.phrebh.com.