Source Code

Below is the PHP Source Code for the rot_n() function used on this site.

64 && $ascii<91) { $rotated = $rotated + $n; $rotated > 90 && $rotated += -90 + 64; $rotated < 65 && $rotated += -64 + 90; } # Lowercase letters are 97 to 122 elseif ($ascii>96 && $ascii<123) { $rotated = $rotated + $n; $rotated > 122 && $rotated += -122 + 96; $rotated < 97 && $rotated += -96 + 122; } # Numeric digits are 48 to 57 if($n_numeric AND $ascii>47 AND $ascii<58) { $rotated = $rotated + $n_numeric; $rotated > 47 && $rotated += -57 + 47; $rotated < 58 && $rotated += -47 + 57; } $result .= chr($rotated); } return $result; } ?>‘; echo highlight_string($source_code, TRUE); ?>