<?php
//This is the key-table for crypter.
$cryptkey = array('0' => 286, '1' => 949, '2' => 695, '3' => 348, '4' => 438, '5' => 977, '6' => 320, '7' => 418, '8' => 970, '9' => 482, '[' => 466, ']' => 770,
'.' => 569, ' ' => 242, '-' => 166, 'A' => 583, 'B' => 575, 'C' => 247,
'D' => 564, 'E' => 192, 'F' => 513, 'G' => 653, 'H' => 605, 'I' => 450,
'J' => 404, 'K' => 831, 'L' => 315, 'M' => 953, 'N' => 439, 'O' => 266,
'P' => 231, 'Q' => 633, 'R' => 881, 'S' => 113, 'T' => 935, 'U' => 559,
'V' => 318, 'W' => 927, 'X' => 906, 'Y' => 463, 'Z' => 184, 'a' => 263,
'b' => 453, 'c' => 208, 'd' => 591, 'e' => 511, 'f' => 343, 'g' => 969,
'h' => 415, 'i' => 420, 'j' => 175, 'k' => 410, 'l' => 295, 'm' => 265,
'n' => 877, 'o' => 200, 'p' => 837, 'q' => 913, 'r' => 515, 's' => 262,
't' => 524, 'u' => 874, 'v' => 525, 'w' => 700, 'x' => 670, 'y' => 918,
'z' => 290, '<' => 331, '>' => 533, "'" => 425, ',' => 101, ':' => 495,
'$' => 114, '\\' => 268, '/' => 721, '=' => 454);
//Don't mind about some flaws in table ... solving them later.
// Just some dummy values to keep PHP happy :)
$curdate = "03/28/2011";
$color = "#ffffff";
$rotation = "RoundItGoes";
$ip = "192.168.0.1";
$msg = "Hello world!";
//This is the string we're going to crypt.
$notcrypted1 = "[$curdate] - Rotation was <font color = '$color'><b>$rotation</b></font> degrees, done by <b>$ip</b>, who says: ''<b>$msg</b>''\r\n";
//Splitting the string here.
// Replace the characters in the string with their crypted equivalents
foreach($split1 as $key => $value)
{
$split1[$key] = $cryptkey[$value];
else
{
// An error occurred, the character is not present in the cryptkey table
// do sth. like outputting an error or inserting a special number or the original
// character or whatever
print "OOPS! An error occurred. Do something, QUICK! :)";
}
}
// Joining again to get back a single string
// Output the crypted result
print "\nCrypted result is: <".$crypted1.">\n";
?>